210
211
.query = dell_rfkill_query,
214
static void dell_rfkill_update(void)
217
dell_rfkill_query(wifi_rfkill, (void *)1);
218
if (bluetooth_rfkill)
219
dell_rfkill_query(bluetooth_rfkill, (void *)2);
221
dell_rfkill_query(wwan_rfkill, (void *)3);
213
224
static int dell_setup_rfkill(void)
215
226
struct calling_interface_buffer buffer;
314
325
.update_status = dell_send_intensity,
328
static const struct input_device_id dell_input_ids[] = {
334
.flags = INPUT_DEVICE_ID_MATCH_BUS |
335
INPUT_DEVICE_ID_MATCH_VENDOR |
336
INPUT_DEVICE_ID_MATCH_PRODUCT |
337
INPUT_DEVICE_ID_MATCH_VERSION
342
static bool dell_input_filter(struct input_handle *handle, unsigned int type,
343
unsigned int code, int value)
345
if (type == EV_KEY && code == KEY_WLAN && value == 1) {
346
dell_rfkill_update();
353
static void dell_input_event(struct input_handle *handle, unsigned int type,
354
unsigned int code, int value)
358
static int dell_input_connect(struct input_handler *handler,
359
struct input_dev *dev,
360
const struct input_device_id *id)
362
struct input_handle *handle;
365
handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
370
handle->handler = handler;
371
handle->name = "dell-laptop";
373
error = input_register_handle(handle);
375
goto err_free_handle;
377
error = input_open_device(handle);
379
goto err_unregister_handle;
381
error = input_filter_device(handle);
383
goto err_close_handle;
388
input_close_device(handle);
389
err_unregister_handle:
390
input_unregister_handle(handle);
396
static void dell_input_disconnect(struct input_handle *handle)
398
input_close_device(handle);
399
input_unregister_handle(handle);
403
static struct input_handler dell_input_handler = {
404
.name = "dell-laptop",
405
.filter = dell_input_filter,
406
.event = dell_input_event,
407
.connect = dell_input_connect,
408
.disconnect = dell_input_disconnect,
409
.id_table = dell_input_ids,
317
412
static int __init dell_init(void)
319
414
struct calling_interface_buffer buffer;