• Home
  • Raw
  • Download

Lines Matching full:rfkill

21 #include <uapi/linux/rfkill.h>
41 struct rfkill;
44 * struct rfkill_ops - rfkill driver methods
46 * @poll: poll the rfkill block state(s) -- only assign this method
52 * @query: query the rfkill block state(s) and call exactly one of the
55 * the rfkill core query your driver before setting a requested
62 void (*poll)(struct rfkill *rfkill, void *data);
63 void (*query)(struct rfkill *rfkill, void *data);
69 * rfkill_alloc - Allocate rfkill structure
73 * @ops: rfkill methods
77 * rfkill structure. Returns %NULL on failure.
79 struct rfkill * __must_check rfkill_alloc(const char *name,
86 * rfkill_register - Register a rfkill structure.
87 * @rfkill: rfkill structure to be registered
90 * the rfkill structure. Before calling this function the driver needs
91 * to be ready to service method calls from rfkill.
100 int __must_check rfkill_register(struct rfkill *rfkill);
103 * rfkill_pause_polling(struct rfkill *rfkill)
110 void rfkill_pause_polling(struct rfkill *rfkill);
113 * rfkill_resume_polling(struct rfkill *rfkill)
119 void rfkill_resume_polling(struct rfkill *rfkill);
123 * rfkill_unregister - Unregister a rfkill structure.
124 * @rfkill: rfkill structure to be unregistered
127 * teardown to destroy rfkill structure. Until it returns, the driver
130 void rfkill_unregister(struct rfkill *rfkill);
133 * rfkill_destroy - Free rfkill structure
134 * @rfkill: rfkill structure to be destroyed
136 * Destroys the rfkill structure.
138 void rfkill_destroy(struct rfkill *rfkill);
141 * rfkill_set_hw_state - Set the internal rfkill hardware block state
142 * @rfkill: pointer to the rfkill class to modify.
145 * rfkill drivers that get events when the hard-blocked state changes
146 * use this function to notify the rfkill core (and through that also
152 * This function can be called in any context, even from within rfkill
159 bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
162 * rfkill_set_sw_state - Set the internal rfkill software block state
163 * @rfkill: pointer to the rfkill class to modify.
166 * rfkill drivers that get events when the soft-blocked state changes
168 * use this function to notify the rfkill core (and through that also
175 * This function can be called in any context, even from within rfkill
181 bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked);
185 * @rfkill: pointer to the rfkill class to modify.
188 * rfkill drivers that preserve their software block state over power off
189 * use this function to notify the rfkill core (and through that also
197 void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked);
200 * rfkill_set_states - Set the internal rfkill block states
201 * @rfkill: pointer to the rfkill class to modify.
205 * This function can be called in any context, even from within rfkill
208 void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw);
211 * rfkill_blocked - Query rfkill block state
213 * @rfkill: rfkill struct to query
215 bool rfkill_blocked(struct rfkill *rfkill);
218 * rfkill_find_type - Helper for finding rfkill type by name
225 #else /* !RFKILL */
226 static inline struct rfkill * __must_check
236 static inline int __must_check rfkill_register(struct rfkill *rfkill) in rfkill_register() argument
238 if (rfkill == ERR_PTR(-ENODEV)) in rfkill_register()
243 static inline void rfkill_pause_polling(struct rfkill *rfkill) in rfkill_pause_polling() argument
247 static inline void rfkill_resume_polling(struct rfkill *rfkill) in rfkill_resume_polling() argument
251 static inline void rfkill_unregister(struct rfkill *rfkill) in rfkill_unregister() argument
255 static inline void rfkill_destroy(struct rfkill *rfkill) in rfkill_destroy() argument
259 static inline bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked) in rfkill_set_hw_state() argument
264 static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked) in rfkill_set_sw_state() argument
269 static inline void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked) in rfkill_init_sw_state() argument
273 static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) in rfkill_set_states() argument
277 static inline bool rfkill_blocked(struct rfkill *rfkill) in rfkill_blocked() argument
287 #endif /* RFKILL || RFKILL_MODULE */
296 const char *rfkill_get_led_trigger_name(struct rfkill *rfkill);
300 * @rfkill: rfkill struct
304 * trigger that rfkill creates. It is optional, but if called
307 void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name);
309 static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) in rfkill_get_led_trigger_name() argument
315 rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) in rfkill_set_led_trigger_name() argument