ssam_nf_ref...disable_free(9)
Okay bestie, welcome to the Kernel API Manual page for ssam_nf_ref...disable_free(9) β and yes, the main-character function here is ssam_nf_refcount_disable_free. Letβs get into it π
β¨
πΈ NAME πΈ
ssam_nf_refcount_disable_free β disables the event for a reference count entry if it is no longer in use, and frees the corresponding entry. Periodt. π
β¨ SYNOPSIS β¨
int ssam_nf_refcount_disable_free (struct ssam_controller *ctrl , struct
ssam_nf_refcount_entry *entry , u8 flags , bool ec );
π ARGUMENTS π
ctrlβ the controller to disable the event on, bestie.entryβ the reference count entry for the event to be disabled.flagsβ the flags used for enabling the event on the EC.ecβ flag specifying if the event should actually be disabled on the EC.
π¦ DESCRIPTION π¦
Okay so hereβs the vibe: if ec equals true and the reference count equals zero (i.e. the event is no longer requested by any client), the specified event will be disabled on the EC via the corresponding request. Slay. π₯
If ec equals false, no request will be sent to the EC and the event can be considered in a detached state (i.e. no longer used but still enabled). Disabling an event via this method may be required for hot-removable devices, where event disable requests may time out after the device has been physically removed. Itβs giving βmessy cleanup energy,β but itβs necessary sometimes π.
In both cases, if the reference count equals zero, the corresponding reference count entry will be freed. The reference count entry must not be used any more after a call to this function. Like, do not touch it after this β fr fr. π
It also checks if the flags used for disabling the event match the flags used for enabling the event and warns if they do not (regardless of reference count). Vibe check: failed, but with a warning. π
This does not modify the reference count itself, which is done with ssam_nf_refcount_inc / ssam_nf_refcount_dec. So donβt expect this function to handle the count for you, bestie. π«Ά
π NOTE π
nf->lock must be held when calling this function. No cap β lock it before you call it. π
β RETURN β
Returns zero on success. If the event is disabled by this call, returns the status of the event-enable EC command. Thatβs the whole return tea ββ¨
π SEE ALSO π
- Kernel file:
./drivers/platform/surface/aggregator/controller.c ssh_seq_reset(9),ssh_seq_next(9),ssh_rqid_reset(9),ssh_rqid_next(9),ssam_event_matches_notifier(9),ssam_nfblk_call_chain(9),ssam_nfblk_insert(9),ssam_nfblk_find(9),ssam_nfblk_remove(9),ssam_nf_head_init(9),ssam_nf_head_destroy(9),struct ssam_nf_refcount_key(9),struct ssam_nf_refcount_entry(9),ssam_nf_refcount_inc(9),ssam_nf_refcount_dec(9),ssam_nf_refcount_dec_free(9),ssam_nf_refcount_empty(9),ssam_nf_call(9),ssam_nf_init(9),ssam_nf_destroy(9),ssam_event_item_cache_init(9),ssam_event_item_cache_destroy(9),ssam_event_item_free(9),ssam_event_item_alloc(9),ssam_event_queue_push(9),ssam_event_queue_pop(9),ssam_event_queue_is_empty(9),ssam_cplt_get_event_queue(9),ssam_cplt_submit(9),ssam_cplt_submit_event(9),ssam_cplt_flush(9),ssam_event_queue_init(9),ssam_cplt_init(9),ssam_cplt_destroy(9),ssam_controller_device(9),ssam_controller_get(9),ssam_controller_put(9),ssam_controller_statelock(9),ssam_controller_stateunlock(9),ssam_controller_lock(9),ssam_controller_caps_load_from_acpi(9),ssam_controller_caps_load_from_of(9),ssam_controller_caps_load(9),ssam_controller_init(9),ssam_controller_start(9),ssam_controller_shutdown(9),ssam_controller_destroy(9),ssam_controller_suspend(9),ssam_controller_resume(9),ssam_request_write_data(9),ssam_request_sync_alloc(9),ssam_request_sync_free(9),ssam_request_sync_init(9),ssam_request_sync_submit(9),ssam_request_do_sync(9),ssam_request_do_sync_with_buffer(9),struct ssh_notification_params(9),ssam_ssh_event_enable(9),ssam_ssh_event_disable(9),ssam_get_firmware_version(9),ssam_ctrl_notif_display_off(9),ssam_ctrl_notif_display_on(9),ssam_ctrl_notif_d0_exit(9),ssam_ctrl_notif_d0_entry(9),ssam_nf_refcount_enable(9),ssam_notifier_register(9),__ssam_notifier_unregister(9),ssam_controller_event_enable(9),ssam_controller_event_disable(9),ssam_notifier_disable_registered(9),ssam_notifier_restore_registered(9),ssam_notifier_is_empty(9),ssam_notifier_unregister_all(9),ssam_irq_setup(9),ssam_irq_free(9),ssam_irq_arm_for_wakeup(9),ssam_irq_disarm_wakeup(9)
Bye bestie! This pageβs source/version stamp is ./drivers/platform/surface/agg... and itβs dated October 2026 β footer title vibe: ssam_nf_ref...disable_free(9). Mwah! πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms