Lines Matching refs:device
49 static int ebook_send_state(struct acpi_device *device) in ebook_send_state() argument
51 struct ebook_switch *button = acpi_driver_data(device); in ebook_send_state()
55 status = acpi_evaluate_integer(device->handle, "EBK", NULL, &state); in ebook_send_state()
65 static void ebook_switch_notify(struct acpi_device *device, u32 event) in ebook_switch_notify() argument
70 ebook_send_state(device); in ebook_switch_notify()
80 static int ebook_switch_resume(struct device *dev) in ebook_switch_resume()
88 static int ebook_switch_add(struct acpi_device *device) in ebook_switch_add() argument
92 const char *hid = acpi_device_hid(device); in ebook_switch_add()
100 device->driver_data = button; in ebook_switch_add()
108 name = acpi_device_name(device); in ebook_switch_add()
109 class = acpi_device_class(device); in ebook_switch_add()
125 input->dev.parent = &device->dev; in ebook_switch_add()
134 ebook_send_state(device); in ebook_switch_add()
136 if (device->wakeup.flags.valid) { in ebook_switch_add()
138 acpi_enable_gpe(device->wakeup.gpe_device, in ebook_switch_add()
139 device->wakeup.gpe_number); in ebook_switch_add()
140 device_set_wakeup_enable(&device->dev, true); in ebook_switch_add()
152 static int ebook_switch_remove(struct acpi_device *device) in ebook_switch_remove() argument
154 struct ebook_switch *button = acpi_driver_data(device); in ebook_switch_remove()