]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Add mode mapping function to struct regulator_desc
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Mon, 10 Nov 2014 13:43:52 +0000 (14:43 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Nov 2014 18:58:14 +0000 (18:58 +0000)
commit6dd4a7f31cf79ee2caefed0f576497de6237eba2
treea22e2d064e7c8c019da8558ae61de9fed58979e2
parentf64d7518ba4df8278670145bfcd7f919a15a91b3
regulator: Add mode mapping function to struct regulator_desc

The "regulator-initial-mode" and "regulator-mode" DT properties allows
to configure the regulator operating modes at startup or when a system
enters into a susend state.

But these properties use as valid values the operating modes supported
by each device while the core deals with the standard operating modes.
So a mapping function is needed to translate from the hardware specific
modes to the standard ones.

This mapping is a non-varying configuration for each regulator, so add
a function pointer to struct regulator_desc that will allow drivers to
define their callback to do the modes translation.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/regulator/driver.h