Lines Matching full:pwron
55 struct palmas_pwron *pwron = container_of(work, in palmas_power_button_work() local
58 struct input_dev *input_dev = pwron->input_dev; in palmas_power_button_work()
62 error = palmas_read(pwron->palmas, PALMAS_INTERRUPT_BASE, in palmas_power_button_work()
66 "Cannot read palmas PWRON status: %d\n", error); in palmas_power_button_work()
73 schedule_delayed_work(&pwron->input_work, in palmas_power_button_work()
81 * @palmas_pwron: pwron struct
87 struct palmas_pwron *pwron = palmas_pwron; in pwron_irq() local
88 struct input_dev *input_dev = pwron->input_dev; in pwron_irq()
94 mod_delayed_work(system_wq, &pwron->input_work, in pwron_irq()
134 "ti,palmas-pwron-debounce-milli-seconds", in palmas_pwron_params_ofinit()
160 struct palmas_pwron *pwron; in palmas_pwron_probe() local
167 pwron = kzalloc(sizeof(*pwron), GFP_KERNEL); in palmas_pwron_probe()
168 if (!pwron) in palmas_pwron_probe()
200 pwron->palmas = palmas; in palmas_pwron_probe()
201 pwron->input_dev = input_dev; in palmas_pwron_probe()
203 INIT_DELAYED_WORK(&pwron->input_work, palmas_power_button_work); in palmas_pwron_probe()
205 pwron->irq = platform_get_irq(pdev, 0); in palmas_pwron_probe()
206 if (pwron->irq < 0) { in palmas_pwron_probe()
207 error = pwron->irq; in palmas_pwron_probe()
211 error = request_threaded_irq(pwron->irq, NULL, pwron_irq, in palmas_pwron_probe()
215 dev_name(dev), pwron); in palmas_pwron_probe()
217 dev_err(dev, "Can't get IRQ for pwron: %d\n", error); in palmas_pwron_probe()
227 platform_set_drvdata(pdev, pwron); in palmas_pwron_probe()
233 cancel_delayed_work_sync(&pwron->input_work); in palmas_pwron_probe()
234 free_irq(pwron->irq, pwron); in palmas_pwron_probe()
238 kfree(pwron); in palmas_pwron_probe()
250 struct palmas_pwron *pwron = platform_get_drvdata(pdev); in palmas_pwron_remove() local
252 free_irq(pwron->irq, pwron); in palmas_pwron_remove()
253 cancel_delayed_work_sync(&pwron->input_work); in palmas_pwron_remove()
255 input_unregister_device(pwron->input_dev); in palmas_pwron_remove()
256 kfree(pwron); in palmas_pwron_remove()
270 struct palmas_pwron *pwron = platform_get_drvdata(pdev); in palmas_pwron_suspend() local
272 cancel_delayed_work_sync(&pwron->input_work); in palmas_pwron_suspend()
275 enable_irq_wake(pwron->irq); in palmas_pwron_suspend()
291 struct palmas_pwron *pwron = platform_get_drvdata(pdev); in palmas_pwron_resume() local
294 disable_irq_wake(pwron->irq); in palmas_pwron_resume()