summaryrefslogtreecommitdiff
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@ti.com>2016-06-24 11:28:07 +0300
committerMark Brown <broonie@kernel.org>2016-06-27 19:56:43 +0300
commit3de56099591a4042556a2d05d4703387ad950c6f (patch)
tree40cf8dec1a8084cc745d3ed5245c7f7753a99f1d /include/linux/mfd
parent1a695a905c18548062509178b98bc91e67510864 (diff)
downloadlinux-3de56099591a4042556a2d05d4703387ad950c6f.tar.xz
regulator: tps65217: Enable suspend configuration
The TPS65217 has a pre-defined power-up / power-down sequence which in a typical application does not need to be changed. However, it is possible to define custom sequences under I2C control. The power-up sequence is defined by strobes and delay times. Each output rail is assigned to a strobe to determine the order in which the rails are enabled. Every regulator of tps65217 PMIC has sequence registers and every regulator has a default strobe value and gets disabled when a particular power down sequence occurs. To keep a regulator on during suspend we write value 0 to strobe so that the regulator is out of all sequencers and is not impacted by any power down sequence. Hence saving the default strobe value during probe so that when we want to regulator to be enabled during suspend we write 0 to strobe and when we want it to get disabled during suspend we write the default saved strobe value. This allows platform data to specify which power rails should be on or off during RTC only suspend. This is necessary to keep DDR state while in RTC only suspend. Signed-off-by: Russ Dill <Russ.Dill@ti.com> [Enhanced commit log and added dynamic allocation for strobes] Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/tps65217.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index ac7fba44d7e4..1c88231496d3 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -257,6 +257,7 @@ struct tps65217 {
unsigned long id;
struct regulator_desc desc[TPS65217_NUM_REGULATOR];
struct regmap *regmap;
+ u8 *strobes;
};
static inline struct tps65217 *dev_to_tps65217(struct device *dev)