summaryrefslogtreecommitdiffstats
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2014-05-20 11:17:54 -0700
committerLee Jones <lee.jones@linaro.org>2014-05-28 08:05:32 +0100
commite7cd1d1eb16fcdf53001b926187a82f1f3e1a7e6 (patch)
tree2dac768a3fe773e824f5dd9a744defdc0af57a55 /include/linux/i2c
parent320572813ded2cc17581b22cdc5dc775aaf83f53 (diff)
downloadop-kernel-dev-e7cd1d1eb16fcdf53001b926187a82f1f3e1a7e6.zip
op-kernel-dev-e7cd1d1eb16fcdf53001b926187a82f1f3e1a7e6.tar.gz
mfd: twl4030-power: Add generic reset configuration
The twl4030 PMIC needs to be configured properly for things like warm reset and deeper idle states so the PMIC manages the regulators properly based on the hardware triggers from the SoC. Earlier we have configured twl4030 using platform data, but we want to do it for device tree based booting also. In some cases configuring twl4030 is needed for things to work. For example, when rebooting an OMAP3530 at 125 MHz, it hangs. With this patch, TWL4030 will be reset when a warm reset occures, and OMAP3530 does not hang on reboot. Let's add device tree support and configure things for warm reset as the default when compatible = "ti,twl4030-power". More complicated configurations can be added to the driver based on other compatible flags. Note we now also make the pdata const like it should be. This allows use it for match->data with the device tree related functions. Based on earlier patch by Matthias Brugger <matthias.bgg@gmail.com> and Lesly A M <leslyam@ti.com>. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/twl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index ade1c06..5fe0313 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -486,7 +486,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
#define RES_GRP_ALL 0x7 /* All resource groups */
#define RES_TYPE2_R0 0x0
+#define RES_TYPE2_R1 0x1
+#define RES_TYPE2_R2 0x2
+#define RES_TYPE_R0 0x0
#define RES_TYPE_ALL 0x7
/* Resource states */
OpenPOWER on IntegriCloud