Lines Matching +full:button +full:-

1 // SPDX-License-Identifier: GPL-2.0
3 * adv_swbutton.c - Software Button Interface Driver.
24 /*-------------------------------------------------------------------------
26 *--------------------------------------------------------------------------
31 struct adv_swbutton *button = dev_get_drvdata(&device->dev); in adv_swbutton_notify() local
35 input_report_key(button->input, KEY_PROG1, 0); in adv_swbutton_notify()
36 input_sync(button->input); in adv_swbutton_notify()
39 input_report_key(button->input, KEY_PROG1, 1); in adv_swbutton_notify()
40 input_sync(button->input); in adv_swbutton_notify()
43 dev_dbg(&device->dev, "Unsupported event [0x%x]\n", event); in adv_swbutton_notify()
49 struct adv_swbutton *button; in adv_swbutton_probe() local
51 acpi_handle handle = ACPI_HANDLE(&device->dev); in adv_swbutton_probe()
55 button = devm_kzalloc(&device->dev, sizeof(*button), GFP_KERNEL); in adv_swbutton_probe()
56 if (!button) in adv_swbutton_probe()
57 return -ENOMEM; in adv_swbutton_probe()
59 dev_set_drvdata(&device->dev, button); in adv_swbutton_probe()
61 input = devm_input_allocate_device(&device->dev); in adv_swbutton_probe()
63 return -ENOMEM; in adv_swbutton_probe()
65 button->input = input; in adv_swbutton_probe()
66 snprintf(button->phys, sizeof(button->phys), "%s/button/input0", ACPI_BUTTON_HID_SWBTN); in adv_swbutton_probe()
68 input->name = "Advantech Software Button"; in adv_swbutton_probe()
69 input->phys = button->phys; in adv_swbutton_probe()
70 input->id.bustype = BUS_HOST; in adv_swbutton_probe()
71 input->dev.parent = &device->dev; in adv_swbutton_probe()
72 set_bit(EV_REP, input->evbit); in adv_swbutton_probe()
79 device_init_wakeup(&device->dev, true); in adv_swbutton_probe()
86 dev_err(&device->dev, "Error installing notify handler\n"); in adv_swbutton_probe()
87 return -EIO; in adv_swbutton_probe()
95 acpi_handle handle = ACPI_HANDLE(&device->dev); in adv_swbutton_remove()
118 MODULE_DESCRIPTION("Advantech ACPI SW Button Driver");