aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlberto Panizzo <maramaopercheseimorto@gmail.com>2010-01-19 06:48:54 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-03-03 09:49:23 -0500
commitf4b97b36b7c6b2d4455f27d6371869f915cbe8fd (patch)
tree460b29d5ed24c2f3d499099d35df2ee7ae01bba4 /include
parenteda79a3041a2cada0d4ee9491c99c3874b322356 (diff)
regulator: mc13783: consider Power Gates as digital regulators.
GPO regulators are digital outputs that can be enabled or disabled by a dedicated bit in mc13783 POWERMISC register. In this family can be count in also Power Gates (PWGT1 and 2): enabled by a dedicated pin a Power Gate is an hardware driven supply where the output (PWGTnDRV) follow this law: Bit PWGTxSPIEN | Pin PWGTxEN | PWGTxDRV | Read Back 0 = default | | | PWGTxSPIEN ---------------+-------------+----------+------------ 1 | x | Low | 0 0 | 0 | High | 1 0 | 1 | Low | 0 As read back value of control bit reflects the PWGTxDRV state (not the control value previously written) and mc13783 POWERMISC register contain only regulator related bits, a dedicated function to manage these bits is created here with the aim of tracing the real value of PWGTxSPIEN bits and reproduce it on next writes. All POWERMISC users _must_ use the new function to not accidentally disable Power Gates supplies. v2 changes: -Better utilization of abstraction layers. -Voltage query support. GPO's and PWGTxDRV are fixed voltage regulator with voltage value of 3.1V and 5.5V respectively. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/mc13783.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h
index 35680409b8cf..94cb51a64037 100644
--- a/include/linux/mfd/mc13783.h
+++ b/include/linux/mfd/mc13783.h
@@ -108,6 +108,8 @@ int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode,
108#define MC13783_REGU_V2 28 108#define MC13783_REGU_V2 28
109#define MC13783_REGU_V3 29 109#define MC13783_REGU_V3 29
110#define MC13783_REGU_V4 30 110#define MC13783_REGU_V4 30
111#define MC13783_REGU_PWGT1SPI 31
112#define MC13783_REGU_PWGT2SPI 32
111 113
112#define MC13783_IRQ_ADCDONE 0 114#define MC13783_IRQ_ADCDONE 0
113#define MC13783_IRQ_ADCBISDONE 1 115#define MC13783_IRQ_ADCBISDONE 1