]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: IRQ based event/error notification helpers
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Thu, 3 Jun 2021 05:41:55 +0000 (08:41 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jun 2021 12:08:40 +0000 (13:08 +0100)
commit856ca030179f44f26c0d053bda58f852e9b7ba8b
tree8335c7f51220aaec7686dacb67c9be8831bad121
parentd79336c67ec79c036b2eab41d874d6f30ee9fb83
regulator: IRQ based event/error notification helpers

Provide helper function for IC's implementing regulator notifications
when an IRQ fires. The helper also works for IRQs which can not be acked.
Helper can be set to disable the IRQ at handler and then re-enabling it
on delayed work later. The helper also adds regulator_get_error_flags()
errors in cache for the duration of IRQ disabling.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/ebdf86d8c22b924667ec2385330e30fcbfac0119.1622628334.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/Makefile
drivers/regulator/core.c
drivers/regulator/devres.c
drivers/regulator/irq_helpers.c [new file with mode: 0644]
include/linux/regulator/driver.h