~timchen119/ubuntu/trusty/gnome-bluetooth/lp1035431

« back to all changes in this revision

Viewing changes to lib/rfkill.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2011-02-27 15:45:22 UTC
  • mfrom: (1.3.2 upstream)
  • mto: (2.2.3 experimental) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: james.westby@ubuntu.com-20110227154522-dnnoqasv5v3mv42a
Tags: upstream-2.91.5
ImportĀ upstreamĀ versionĀ 2.91.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#define RFKILL_STATE_UNBLOCKED          1
30
30
#define RFKILL_STATE_HARD_BLOCKED       2
31
31
 
32
 
/**
 
32
/*
33
33
 * enum rfkill_type - type of rfkill switch.
34
34
 *
35
35
 * @RFKILL_TYPE_ALL: toggles all switches (userspace only)
50
50
        NUM_RFKILL_TYPES,
51
51
};
52
52
 
53
 
/**
 
53
/*
54
54
 * enum rfkill_operation - operation types
55
55
 * @RFKILL_OP_ADD: a device was added
56
56
 * @RFKILL_OP_DEL: a device was removed
64
64
        RFKILL_OP_CHANGE_ALL,
65
65
};
66
66
 
67
 
/**
 
67
/*
68
68
 * struct rfkill_event - events for userspace on /dev/rfkill
69
69
 * @idx: index of dev rfkill
70
70
 * @type: type of the rfkill struct
109
109
/* this is opaque */
110
110
struct rfkill;
111
111
 
112
 
/**
 
112
/*
113
113
 * struct rfkill_ops - rfkill driver methods
114
114
 *
115
115
 * @poll: poll the rfkill block state(s) -- only assign this method
134
134
};
135
135
 
136
136
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
137
 
/**
 
137
/*
138
138
 * rfkill_alloc - allocate rfkill structure
139
139
 * @name: name of the struct -- the string is not copied internally
140
140
 * @parent: device that has rf switch on it
151
151
                                          const struct rfkill_ops *ops,
152
152
                                          void *ops_data);
153
153
 
154
 
/**
 
154
/*
155
155
 * rfkill_register - Register a rfkill structure.
156
156
 * @rfkill: rfkill structure to be registered
157
157
 *
161
161
 */
162
162
int __must_check rfkill_register(struct rfkill *rfkill);
163
163
 
164
 
/**
 
164
/*
165
165
 * rfkill_pause_polling(struct rfkill *rfkill)
166
166
 *
167
167
 * Pause polling -- say transmitter is off for other reasons.
170
170
 */
171
171
void rfkill_pause_polling(struct rfkill *rfkill);
172
172
 
173
 
/**
 
173
/*
174
174
 * rfkill_resume_polling(struct rfkill *rfkill)
175
175
 *
176
176
 * Pause polling -- say transmitter is off for other reasons.
180
180
void rfkill_resume_polling(struct rfkill *rfkill);
181
181
 
182
182
 
183
 
/**
 
183
/*
184
184
 * rfkill_unregister - Unregister a rfkill structure.
185
185
 * @rfkill: rfkill structure to be unregistered
186
186
 *
190
190
 */
191
191
void rfkill_unregister(struct rfkill *rfkill);
192
192
 
193
 
/**
 
193
/*
194
194
 * rfkill_destroy - free rfkill structure
195
195
 * @rfkill: rfkill structure to be destroyed
196
196
 *
198
198
 */
199
199
void rfkill_destroy(struct rfkill *rfkill);
200
200
 
201
 
/**
 
201
/*
202
202
 * rfkill_set_hw_state - Set the internal rfkill hardware block state
203
203
 * @rfkill: pointer to the rfkill class to modify.
204
204
 * @state: the current hardware block state to set
219
219
 */
220
220
bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
221
221
 
222
 
/**
 
222
/*
223
223
 * rfkill_set_sw_state - Set the internal rfkill software block state
224
224
 * @rfkill: pointer to the rfkill class to modify.
225
225
 * @state: the current software block state to set
238
238
 */
239
239
bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked);
240
240
 
241
 
/**
 
241
/*
242
242
 * rfkill_set_states - Set the internal rfkill block states
243
243
 * @rfkill: pointer to the rfkill class to modify.
244
244
 * @sw: the current software block state to set
249
249
 */
250
250
void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw);
251
251
 
252
 
/**
 
252
/*
253
253
 * rfkill_set_global_sw_state - set global sw block default
254
254
 * @type: rfkill type to set default for
255
255
 * @blocked: default to set
262
262
 */
263
263
void rfkill_set_global_sw_state(const enum rfkill_type type, bool blocked);
264
264
 
265
 
/**
 
265
/*
266
266
 * rfkill_blocked - query rfkill block
267
267
 *
268
268
 * @rfkill: rfkill struct to query
329
329
 
330
330
 
331
331
#ifdef CONFIG_RFKILL_LEDS
332
 
/**
 
332
/*
333
333
 * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED.
334
334
 * This function might return a NULL pointer if registering of the
335
335
 * LED trigger failed. Use this as "default_trigger" for the LED.
336
336
 */
337
337
const char *rfkill_get_led_trigger_name(struct rfkill *rfkill);
338
338
 
339
 
/**
 
339
/*
340
340
 * rfkill_set_led_trigger_name -- set the LED trigger name
341
341
 * @rfkill: rfkill struct
342
342
 * @name: LED trigger name