]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: of: Add support for parsing initial and suspend modes
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Mon, 10 Nov 2014 13:43:55 +0000 (14:43 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Nov 2014 18:58:14 +0000 (18:58 +0000)
commitb09b1d2deefbe2ca11502de93f8cbd494b92b1e5
treebf723806a38f3d19bebb4bbf23fa46838568ee1f
parent2c8f1d218bafc6d65e50c167785731d093f4de68
regulator: of: Add support for parsing initial and suspend modes

Some regulators support their operating mode to be changed on startup
or by consumers when the system is running while others only support
their operating mode to be changed while the system has entered in a
suspend state.

The regulator Device Tree binding documents a set of properties to
configure the regulators operating modes from a FDT. This patch builds
on (5b2041b regulator: of: Add support for parsing regulator_state for
suspend state) and adds support to parse those properties and fill the
regulator constraints so the regulator core can call the right suspend
handlers when the system enters into sleep.

The modes are defined in the Device Tree using the hardware specific
modes supported by the regulators. Regulator drivers have to define a
translation function that is used to map the hardware specific modes
to the standard ones.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/of_regulator.c