• Home
  • Raw
  • Download

Lines Matching +full:button +full:-

2  *  OLPC XO-1.5 ebook switch driver
3 * (based on generic ACPI button driver)
23 #define MODULE_NAME "xo15-ebook"
35 MODULE_DESCRIPTION("OLPC XO-1.5 ebook switch driver");
51 struct ebook_switch *button = acpi_driver_data(device); in ebook_send_state() local
55 status = acpi_evaluate_integer(device->handle, "EBK", NULL, &state); in ebook_send_state()
57 return -EIO; in ebook_send_state()
60 input_report_switch(button->input, SW_TABLET_MODE, !state); in ebook_send_state()
61 input_sync(button->input); in ebook_send_state()
90 struct ebook_switch *button; in ebook_switch_add() local
96 button = kzalloc(sizeof(struct ebook_switch), GFP_KERNEL); in ebook_switch_add()
97 if (!button) in ebook_switch_add()
98 return -ENOMEM; in ebook_switch_add()
100 device->driver_data = button; in ebook_switch_add()
102 button->input = input = input_allocate_device(); in ebook_switch_add()
104 error = -ENOMEM; in ebook_switch_add()
113 error = -ENODEV; in ebook_switch_add()
120 snprintf(button->phys, sizeof(button->phys), "%s/button/input0", hid); in ebook_switch_add()
122 input->name = name; in ebook_switch_add()
123 input->phys = button->phys; in ebook_switch_add()
124 input->id.bustype = BUS_HOST; in ebook_switch_add()
125 input->dev.parent = &device->dev; in ebook_switch_add()
127 input->evbit[0] = BIT_MASK(EV_SW); in ebook_switch_add()
128 set_bit(SW_TABLET_MODE, input->swbit); in ebook_switch_add()
136 if (device->wakeup.flags.valid) { in ebook_switch_add()
137 /* Button's GPE is run-wake GPE */ 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()
148 kfree(button); in ebook_switch_add()
154 struct ebook_switch *button = acpi_driver_data(device); in ebook_switch_remove() local
156 input_unregister_device(button->input); in ebook_switch_remove()
157 kfree(button); in ebook_switch_remove()