Lines Matching +full:button +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
3 * power/home/volume button support for
16 #include <acpi/button.h>
43 ACPI_MODULE_NAME("surface pro 3 button");
46 MODULE_DESCRIPTION("Surface Pro3 Button Driver");
50 * Power button, Home button, Volume buttons support is supposed to
78 struct surface_button *button = acpi_driver_data(device); in surface_button_notify() local
84 /* Power button press,release handle */ in surface_button_notify()
91 /* Home button press,release handle */ in surface_button_notify()
98 /* Volume up button press,release handle */ in surface_button_notify()
105 /* Volume down button press,release handle */ in surface_button_notify()
113 dev_warn_once(&device->dev, "Tablet mode is not supported\n"); in surface_button_notify()
116 dev_info_ratelimited(&device->dev, in surface_button_notify()
120 input = button->input; in surface_button_notify()
124 pm_wakeup_dev_event(&device->dev, 0, button->suspended); in surface_button_notify()
125 if (button->suspended) in surface_button_notify()
135 struct surface_button *button = acpi_driver_data(device); in surface_button_suspend() local
137 button->suspended = true; in surface_button_suspend()
144 struct surface_button *button = acpi_driver_data(device); in surface_button_resume() local
146 button->suspended = false; in surface_button_resume()
161 acpi_handle handle = dev->handle; in surface_button_check_MSHW0040()
179 oem_platform_rev = result->integer.value; in surface_button_check_MSHW0040()
183 dev_dbg(&dev->dev, "OEM Platform Revision %llu\n", oem_platform_rev); in surface_button_check_MSHW0040()
191 struct surface_button *button; in surface_button_add() local
199 return -ENODEV; in surface_button_add()
202 return -ENODEV; in surface_button_add()
204 button = kzalloc(sizeof(struct surface_button), GFP_KERNEL); in surface_button_add()
205 if (!button) in surface_button_add()
206 return -ENOMEM; in surface_button_add()
208 device->driver_data = button; in surface_button_add()
209 button->input = input = input_allocate_device(); in surface_button_add()
211 error = -ENOMEM; in surface_button_add()
217 snprintf(button->phys, sizeof(button->phys), "%s/buttons", hid); in surface_button_add()
219 input->name = name; in surface_button_add()
220 input->phys = button->phys; in surface_button_add()
221 input->id.bustype = BUS_HOST; in surface_button_add()
222 input->dev.parent = &device->dev; in surface_button_add()
232 device_init_wakeup(&device->dev, true); in surface_button_add()
233 dev_info(&device->dev, in surface_button_add()
240 kfree(button); in surface_button_add()
246 struct surface_button *button = acpi_driver_data(device); in surface_button_remove() local
248 input_unregister_device(button->input); in surface_button_remove()
249 kfree(button); in surface_button_remove()