Lines Matching refs:button
38 struct cpcap_power_button *button = _button; in powerbutton_irq() local
41 val = cpcap_sense_virq(button->regmap, irq); in powerbutton_irq()
43 dev_err(button->dev, "irq read failed: %d", val); in powerbutton_irq()
47 pm_wakeup_event(button->dev, 0); in powerbutton_irq()
48 input_report_key(button->idev, KEY_POWER, val); in powerbutton_irq()
49 input_sync(button->idev); in powerbutton_irq()
56 struct cpcap_power_button *button; in cpcap_power_button_probe() local
64 button = devm_kmalloc(&pdev->dev, sizeof(*button), GFP_KERNEL); in cpcap_power_button_probe()
65 if (!button) in cpcap_power_button_probe()
68 button->idev = devm_input_allocate_device(&pdev->dev); in cpcap_power_button_probe()
69 if (!button->idev) in cpcap_power_button_probe()
72 button->regmap = dev_get_regmap(pdev->dev.parent, NULL); in cpcap_power_button_probe()
73 if (!button->regmap) in cpcap_power_button_probe()
76 button->dev = &pdev->dev; in cpcap_power_button_probe()
78 button->idev->name = "cpcap-pwrbutton"; in cpcap_power_button_probe()
79 button->idev->phys = "cpcap-pwrbutton/input0"; in cpcap_power_button_probe()
80 input_set_capability(button->idev, EV_KEY, KEY_POWER); in cpcap_power_button_probe()
83 powerbutton_irq, IRQF_ONESHOT, "cpcap_pwrbutton", button); in cpcap_power_button_probe()
89 err = input_register_device(button->idev); in cpcap_power_button_probe()