Lines Matching full:onkey

23 static void da9055_onkey_query(struct da9055_onkey *onkey)  in da9055_onkey_query()  argument
27 key_stat = da9055_reg_read(onkey->da9055, DA9055_REG_STATUS_A); in da9055_onkey_query()
29 dev_err(onkey->da9055->dev, in da9055_onkey_query()
30 "Failed to read onkey event %d\n", key_stat); in da9055_onkey_query()
34 * Onkey status bit is cleared when onkey button is released. in da9055_onkey_query()
37 input_report_key(onkey->input, KEY_POWER, 0); in da9055_onkey_query()
38 input_sync(onkey->input); in da9055_onkey_query()
43 * Interrupt is generated only when the ONKEY pin is asserted. in da9055_onkey_query()
47 schedule_delayed_work(&onkey->work, msecs_to_jiffies(10)); in da9055_onkey_query()
53 struct da9055_onkey *onkey = container_of(work, struct da9055_onkey, in da9055_onkey_work() local
56 da9055_onkey_query(onkey); in da9055_onkey_work()
61 struct da9055_onkey *onkey = data; in da9055_onkey_irq() local
63 input_report_key(onkey->input, KEY_POWER, 1); in da9055_onkey_irq()
64 input_sync(onkey->input); in da9055_onkey_irq()
66 da9055_onkey_query(onkey); in da9055_onkey_irq()
74 struct da9055_onkey *onkey; in da9055_onkey_probe() local
78 irq = platform_get_irq_byname(pdev, "ONKEY"); in da9055_onkey_probe()
82 onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); in da9055_onkey_probe()
83 if (!onkey) { in da9055_onkey_probe()
94 onkey->input = input_dev; in da9055_onkey_probe()
95 onkey->da9055 = da9055; in da9055_onkey_probe()
96 input_dev->name = "da9055-onkey"; in da9055_onkey_probe()
97 input_dev->phys = "da9055-onkey/input0"; in da9055_onkey_probe()
103 INIT_DELAYED_WORK(&onkey->work, da9055_onkey_work); in da9055_onkey_probe()
107 "ONKEY", onkey); in da9055_onkey_probe()
110 "Failed to register ONKEY IRQ %d, error = %d\n", in da9055_onkey_probe()
122 platform_set_drvdata(pdev, onkey); in da9055_onkey_probe()
127 free_irq(irq, onkey); in da9055_onkey_probe()
128 cancel_delayed_work_sync(&onkey->work); in da9055_onkey_probe()
137 struct da9055_onkey *onkey = platform_get_drvdata(pdev); in da9055_onkey_remove() local
138 int irq = platform_get_irq_byname(pdev, "ONKEY"); in da9055_onkey_remove()
140 irq = regmap_irq_get_virq(onkey->da9055->irq_data, irq); in da9055_onkey_remove()
141 free_irq(irq, onkey); in da9055_onkey_remove()
142 cancel_delayed_work_sync(&onkey->work); in da9055_onkey_remove()
143 input_unregister_device(onkey->input); in da9055_onkey_remove()
150 .name = "da9055-onkey",
157 MODULE_DESCRIPTION("Onkey driver for DA9055");
159 MODULE_ALIAS("platform:da9055-onkey");