Lines Matching +full:button +full:-
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Airplane mode button for AMD, HP & Xiaomi laptops
5 * Copyright (C) 2014-2017 Alex Hung <alex.hung@canonical.com>
39 struct wl_button *button = acpi_driver_data(device); in wireless_input_setup() local
42 button->input_dev = input_allocate_device(); in wireless_input_setup()
43 if (!button->input_dev) in wireless_input_setup()
44 return -ENOMEM; in wireless_input_setup()
46 snprintf(button->phys, sizeof(button->phys), "%s/input0", acpi_device_hid(device)); in wireless_input_setup()
48 button->input_dev->name = "Wireless hotkeys"; in wireless_input_setup()
49 button->input_dev->phys = button->phys; in wireless_input_setup()
50 button->input_dev->id.bustype = BUS_HOST; in wireless_input_setup()
51 button->input_dev->evbit[0] = BIT(EV_KEY); in wireless_input_setup()
52 set_bit(KEY_RFKILL, button->input_dev->keybit); in wireless_input_setup()
54 err = input_register_device(button->input_dev); in wireless_input_setup()
61 input_free_device(button->input_dev); in wireless_input_setup()
67 struct wl_button *button = acpi_driver_data(device); in wireless_input_destroy() local
69 input_unregister_device(button->input_dev); in wireless_input_destroy()
70 kfree(button); in wireless_input_destroy()
75 struct wl_button *button = acpi_driver_data(acpi_dev); in wl_notify() local
82 input_report_key(button->input_dev, KEY_RFKILL, 1); in wl_notify()
83 input_sync(button->input_dev); in wl_notify()
84 input_report_key(button->input_dev, KEY_RFKILL, 0); in wl_notify()
85 input_sync(button->input_dev); in wl_notify()
90 struct wl_button *button; in wl_add() local
93 button = kzalloc(sizeof(struct wl_button), GFP_KERNEL); in wl_add()
94 if (!button) in wl_add()
95 return -ENOMEM; in wl_add()
97 device->driver_data = button; in wl_add()
102 kfree(button); in wl_add()
114 .name = "wireless-hotkey",