regulator: Add regulator_err2notif() helper
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Wed, 24 Nov 2021 07:16:45 +0000 (09:16 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 24 Nov 2021 12:57:28 +0000 (12:57 +0000)
commit6fadec4c5561e2fbe1dfa8a7da9bc58d094a8f04
tree543d5cf866278ee025636ab8f5eef8f4e1aaf57b
parent1b6ed6bf32fb22ef8e3572fc9c0f6454adf1ca40
regulator: Add regulator_err2notif() helper

Help drivers avoid storing both supported notification and supported error
flags by supporting conversion from regulator error to notification.
This may help saving some bytes.

Add helper for finding the regulator notification corresponding to a
regulator error.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/eb1755ac0569ff07ffa466cf8912c6fd50e7c7c6.1637736436.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/regulator/driver.h