Lines Matching full:button
3 * CPCAP Power Button Input Driver
30 struct cpcap_power_button *button = _button; in powerbutton_irq() local
33 val = cpcap_sense_virq(button->regmap, irq); in powerbutton_irq()
35 dev_err(button->dev, "irq read failed: %d", val); in powerbutton_irq()
39 pm_wakeup_event(button->dev, 0); in powerbutton_irq()
40 input_report_key(button->idev, KEY_POWER, val); in powerbutton_irq()
41 input_sync(button->idev); in powerbutton_irq()
48 struct cpcap_power_button *button; in cpcap_power_button_probe() local
56 button = devm_kmalloc(&pdev->dev, sizeof(*button), GFP_KERNEL); in cpcap_power_button_probe()
57 if (!button) in cpcap_power_button_probe()
60 button->idev = devm_input_allocate_device(&pdev->dev); in cpcap_power_button_probe()
61 if (!button->idev) in cpcap_power_button_probe()
64 button->regmap = dev_get_regmap(pdev->dev.parent, NULL); in cpcap_power_button_probe()
65 if (!button->regmap) in cpcap_power_button_probe()
68 button->dev = &pdev->dev; in cpcap_power_button_probe()
70 button->idev->name = "cpcap-pwrbutton"; in cpcap_power_button_probe()
71 button->idev->phys = "cpcap-pwrbutton/input0"; in cpcap_power_button_probe()
72 input_set_capability(button->idev, EV_KEY, KEY_POWER); in cpcap_power_button_probe()
75 powerbutton_irq, IRQF_ONESHOT, "cpcap_pwrbutton", button); in cpcap_power_button_probe()
81 err = input_register_device(button->idev); in cpcap_power_button_probe()
110 MODULE_DESCRIPTION("CPCAP Power Button");