include/linux/rfkill.h
Source file repositories/reference/linux-study-clean/include/linux/rfkill.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/rfkill.h- Extension
.h- Size
- 11047 bytes
- Lines
- 356
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/linux/rfkill.hlinux/kernel.hlinux/list.hlinux/mutex.hlinux/leds.hlinux/err.h
Detected Declarations
struct devicestruct rfkillstruct rfkill_opsenum rfkill_user_statesfunction corefunction rfkill_allocfunction rfkill_registerfunction rfkill_pause_pollingfunction rfkill_set_hw_statefunction rfkill_set_sw_statefunction rfkill_init_sw_statefunction rfkill_soft_blockedfunction rfkill_find_typefunction rfkill_set_led_trigger_name
Annotated Snippet
struct rfkill_ops {
void (*poll)(struct rfkill *rfkill, void *data);
void (*query)(struct rfkill *rfkill, void *data);
int (*set_block)(void *data, bool blocked);
};
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
/**
* rfkill_alloc - Allocate rfkill structure
* @name: name of the struct -- the string is not copied internally
* @parent: device that has rf switch on it
* @type: type of the switch (RFKILL_TYPE_*)
* @ops: rfkill methods
* @ops_data: data passed to each method
*
* This function should be called by the transmitter driver to allocate an
* rfkill structure. Returns %NULL on failure.
*/
struct rfkill * __must_check rfkill_alloc(const char *name,
struct device *parent,
const enum rfkill_type type,
const struct rfkill_ops *ops,
void *ops_data);
/**
* rfkill_register - Register a rfkill structure.
* @rfkill: rfkill structure to be registered
*
* This function should be called by the transmitter driver to register
* the rfkill structure. Before calling this function the driver needs
* to be ready to service method calls from rfkill.
*
* If rfkill_init_sw_state() is not called before registration,
* set_block() will be called to initialize the software blocked state
* to a default value.
*
* If the hardware blocked state is not set before registration,
* it is assumed to be unblocked.
*/
int __must_check rfkill_register(struct rfkill *rfkill);
/**
* rfkill_pause_polling(struct rfkill *rfkill)
*
* Pause polling -- say transmitter is off for other reasons.
* NOTE: not necessary for suspend/resume -- in that case the
* core stops polling anyway (but will also correctly handle
* the case of polling having been paused before suspend.)
*/
void rfkill_pause_polling(struct rfkill *rfkill);
/**
* rfkill_resume_polling(struct rfkill *rfkill)
*
* Resume polling
* NOTE: not necessary for suspend/resume -- in that case the
* core stops polling anyway
*/
void rfkill_resume_polling(struct rfkill *rfkill);
/**
* rfkill_unregister - Unregister a rfkill structure.
* @rfkill: rfkill structure to be unregistered
*
* This function should be called by the network driver during device
* teardown to destroy rfkill structure. Until it returns, the driver
* needs to be able to service method calls.
*/
void rfkill_unregister(struct rfkill *rfkill);
/**
* rfkill_destroy - Free rfkill structure
* @rfkill: rfkill structure to be destroyed
*
* Destroys the rfkill structure.
*/
void rfkill_destroy(struct rfkill *rfkill);
/**
* rfkill_set_hw_state_reason - Set the internal rfkill hardware block state
* with a reason
* @rfkill: pointer to the rfkill class to modify.
* @blocked: the current hardware block state to set
* @reason: one of &enum rfkill_hard_block_reasons
*
* Prefer to use rfkill_set_hw_state if you don't need any special reason.
*/
bool rfkill_set_hw_state_reason(struct rfkill *rfkill,
bool blocked,
Annotation
- Immediate include surface: `uapi/linux/rfkill.h`, `linux/kernel.h`, `linux/list.h`, `linux/mutex.h`, `linux/leds.h`, `linux/err.h`.
- Detected declarations: `struct device`, `struct rfkill`, `struct rfkill_ops`, `enum rfkill_user_states`, `function core`, `function rfkill_alloc`, `function rfkill_register`, `function rfkill_pause_polling`, `function rfkill_set_hw_state`, `function rfkill_set_sw_state`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.