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>
37 struct wl_button *button = acpi_driver_data(device); in wireless_input_setup() local
40 button->input_dev = input_allocate_device(); in wireless_input_setup()
41 if (!button->input_dev) in wireless_input_setup()
42 return -ENOMEM; in wireless_input_setup()
44 snprintf(button->phys, sizeof(button->phys), "%s/input0", acpi_device_hid(device)); in wireless_input_setup()
46 button->input_dev->name = "Wireless hotkeys"; in wireless_input_setup()
47 button->input_dev->phys = button->phys; in wireless_input_setup()
48 button->input_dev->id.bustype = BUS_HOST; in wireless_input_setup()
49 button->input_dev->evbit[0] = BIT(EV_KEY); in wireless_input_setup()
50 set_bit(KEY_RFKILL, button->input_dev->keybit); in wireless_input_setup()
52 err = input_register_device(button->input_dev); in wireless_input_setup()
59 input_free_device(button->input_dev); in wireless_input_setup()
65 struct wl_button *button = acpi_driver_data(device); in wireless_input_destroy() local
67 input_unregister_device(button->input_dev); in wireless_input_destroy()
68 kfree(button); in wireless_input_destroy()
73 struct wl_button *button = acpi_driver_data(acpi_dev); in wl_notify() local
80 input_report_key(button->input_dev, KEY_RFKILL, 1); in wl_notify()
81 input_sync(button->input_dev); in wl_notify()
82 input_report_key(button->input_dev, KEY_RFKILL, 0); in wl_notify()
83 input_sync(button->input_dev); in wl_notify()
88 struct wl_button *button; in wl_add() local
91 button = kzalloc(sizeof(struct wl_button), GFP_KERNEL); in wl_add()
92 if (!button) in wl_add()
93 return -ENOMEM; in wl_add()
95 device->driver_data = button; in wl_add()
100 kfree(button); in wl_add()
112 .name = "wireless-hotkey",