diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2021-11-24 09:17:13 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-24 12:57:30 +0000 |
commit | a764ff77d697a4a13e69b3379cc613f7409c6b9a (patch) | |
tree | 85c15bedf4737a4b60e18a9d86438d5f2f999c4a /include/linux/regulator | |
parent | 6fadec4c5561e2fbe1dfa8a7da9bc58d094a8f04 (diff) |
regulator: irq_helper: Provide helper for trivial IRQ notifications
Provide a generic map_event helper for regulators which have a notification
IRQ with single, well defined purpose. Eg, IRQ always indicates exactly one
event for exactly one regulator device. For such IRQs the mapping is
trivial.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/603b7ed1938013a00371c1e7ccc63dfb16982b87.1637736436.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 6c6ec9658c30..4078c7776453 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -700,6 +700,8 @@ void *regulator_irq_helper(struct device *dev, int irq_flags, int common_errs, int *per_rdev_errs, struct regulator_dev **rdev, int rdev_amount); void regulator_irq_helper_cancel(void **handle); +int regulator_irq_map_event_simple(int irq, struct regulator_irq_data *rid, + unsigned long *dev_mask); void *rdev_get_drvdata(struct regulator_dev *rdev); struct device *rdev_get_dev(struct regulator_dev *rdev); |