Lines Matching +full:home +full:- +full:button
1 // SPDX-License-Identifier: GPL-2.0-only
3 * power/home/volume button support for
16 #include <acpi/button.h>
44 MODULE_DESCRIPTION("Surface Pro3 Button Driver");
48 * Power button, Home button, Volume buttons support is supposed to
76 struct surface_button *button = acpi_driver_data(device); in surface_button_notify() local
82 /* Power button press,release handle */ in surface_button_notify()
89 /* Home button press,release handle */ in surface_button_notify()
96 /* Volume up button press,release handle */ in surface_button_notify()
103 /* Volume down button press,release handle */ in surface_button_notify()
111 dev_warn_once(&device->dev, "Tablet mode is not supported\n"); in surface_button_notify()
114 dev_info_ratelimited(&device->dev, in surface_button_notify()
118 input = button->input; in surface_button_notify()
122 pm_wakeup_dev_event(&device->dev, 0, button->suspended); in surface_button_notify()
123 if (button->suspended) in surface_button_notify()
133 struct surface_button *button = acpi_driver_data(device); in surface_button_suspend() local
135 button->suspended = true; in surface_button_suspend()
142 struct surface_button *button = acpi_driver_data(device); in surface_button_resume() local
144 button->suspended = false; in surface_button_resume()
159 acpi_handle handle = dev->handle; in surface_button_check_MSHW0040()
177 oem_platform_rev = result->integer.value; in surface_button_check_MSHW0040()
181 dev_dbg(&dev->dev, "OEM Platform Revision %llu\n", oem_platform_rev); in surface_button_check_MSHW0040()
189 struct surface_button *button; in surface_button_add() local
197 return -ENODEV; in surface_button_add()
200 return -ENODEV; in surface_button_add()
202 button = kzalloc(sizeof(struct surface_button), GFP_KERNEL); in surface_button_add()
203 if (!button) in surface_button_add()
204 return -ENOMEM; in surface_button_add()
206 device->driver_data = button; in surface_button_add()
207 button->input = input = input_allocate_device(); in surface_button_add()
209 error = -ENOMEM; in surface_button_add()
215 snprintf(button->phys, sizeof(button->phys), "%s/buttons", hid); in surface_button_add()
217 input->name = name; in surface_button_add()
218 input->phys = button->phys; in surface_button_add()
219 input->id.bustype = BUS_HOST; in surface_button_add()
220 input->dev.parent = &device->dev; in surface_button_add()
230 device_init_wakeup(&device->dev, true); in surface_button_add()
231 dev_info(&device->dev, in surface_button_add()
238 kfree(button); in surface_button_add()
244 struct surface_button *button = acpi_driver_data(device); in surface_button_remove() local
246 input_unregister_device(button->input); in surface_button_remove()
247 kfree(button); in surface_button_remove()