Lines Matching full:onkey

24 static void da9052_onkey_query(struct da9052_onkey *onkey)  in da9052_onkey_query()  argument
28 ret = da9052_reg_read(onkey->da9052, DA9052_STATUS_A_REG); in da9052_onkey_query()
30 dev_err(onkey->da9052->dev, in da9052_onkey_query()
31 "Failed to read onkey event err=%d\n", ret); in da9052_onkey_query()
34 * Since interrupt for deassertion of ONKEY pin is not in da9052_onkey_query()
35 * generated, onkey event state determines the onkey in da9052_onkey_query()
40 input_report_key(onkey->input, KEY_POWER, pressed); in da9052_onkey_query()
41 input_sync(onkey->input); in da9052_onkey_query()
44 * Interrupt is generated only when the ONKEY pin in da9052_onkey_query()
49 schedule_delayed_work(&onkey->work, in da9052_onkey_query()
56 struct da9052_onkey *onkey = container_of(work, struct da9052_onkey, in da9052_onkey_work() local
59 da9052_onkey_query(onkey); in da9052_onkey_work()
64 struct da9052_onkey *onkey = data; in da9052_onkey_irq() local
66 da9052_onkey_query(onkey); in da9052_onkey_irq()
74 struct da9052_onkey *onkey; in da9052_onkey_probe() local
83 onkey = kzalloc(sizeof(*onkey), GFP_KERNEL); in da9052_onkey_probe()
85 if (!onkey || !input_dev) { in da9052_onkey_probe()
91 onkey->input = input_dev; in da9052_onkey_probe()
92 onkey->da9052 = da9052; in da9052_onkey_probe()
93 INIT_DELAYED_WORK(&onkey->work, da9052_onkey_work); in da9052_onkey_probe()
95 input_dev->name = "da9052-onkey"; in da9052_onkey_probe()
96 input_dev->phys = "da9052-onkey/input0"; in da9052_onkey_probe()
102 error = da9052_request_irq(onkey->da9052, DA9052_IRQ_NONKEY, "ONKEY", in da9052_onkey_probe()
103 da9052_onkey_irq, onkey); in da9052_onkey_probe()
105 dev_err(onkey->da9052->dev, in da9052_onkey_probe()
106 "Failed to register ONKEY IRQ: %d\n", error); in da9052_onkey_probe()
110 error = input_register_device(onkey->input); in da9052_onkey_probe()
117 platform_set_drvdata(pdev, onkey); in da9052_onkey_probe()
121 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_probe()
122 cancel_delayed_work_sync(&onkey->work); in da9052_onkey_probe()
125 kfree(onkey); in da9052_onkey_probe()
132 struct da9052_onkey *onkey = platform_get_drvdata(pdev); in da9052_onkey_remove() local
134 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_remove()
135 cancel_delayed_work_sync(&onkey->work); in da9052_onkey_remove()
137 input_unregister_device(onkey->input); in da9052_onkey_remove()
138 kfree(onkey); in da9052_onkey_remove()
145 .name = "da9052-onkey",
151 MODULE_DESCRIPTION("Onkey driver for DA9052");
153 MODULE_ALIAS("platform:da9052-onkey");