aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-08-18 02:19:35 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-28 18:28:48 -0400
commit49e6f87eb6bcdc40663958f938e4b919dca47f40 (patch)
tree640ad6dbd291c01626e30cdb496ceed79521b207 /drivers/mfd
parent89712059c09ff12f1e60e444d05d2ca257dd00ef (diff)
mfd: Switch twl-core over to defines in twl.h
use the new definitions on twl header for code consistency. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl-core.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 5d0fb60a4c14..b0f2c0004efe 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -202,12 +202,6 @@
202 202
203/* Few power values */ 203/* Few power values */
204#define R_CFG_BOOT 0x05 204#define R_CFG_BOOT 0x05
205#define R_PROTECT_KEY 0x0E
206
207/* access control values for R_PROTECT_KEY */
208#define KEY_UNLOCK1 0xce
209#define KEY_UNLOCK2 0xec
210#define KEY_LOCK 0x00
211 205
212/* some fields in R_CFG_BOOT */ 206/* some fields in R_CFG_BOOT */
213#define HFCLK_FREQ_19p2_MHZ (1 << 0) 207#define HFCLK_FREQ_19p2_MHZ (1 << 0)
@@ -846,8 +840,8 @@ static inline int __init protect_pm_master(void)
846{ 840{
847 int e = 0; 841 int e = 0;
848 842
849 e = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_LOCK, 843 e = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0,
850 R_PROTECT_KEY); 844 TWL4030_PM_MASTER_PROTECT_KEY);
851 return e; 845 return e;
852} 846}
853 847
@@ -855,10 +849,13 @@ static inline int __init unprotect_pm_master(void)
855{ 849{
856 int e = 0; 850 int e = 0;
857 851
858 e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK1, 852 e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
859 R_PROTECT_KEY); 853 TWL4030_PM_MASTER_KEY_CFG1,
860 e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK2, 854 TWL4030_PM_MASTER_PROTECT_KEY);
861 R_PROTECT_KEY); 855 e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
856 TWL4030_PM_MASTER_KEY_CFG2,
857 TWL4030_PM_MASTER_PROTECT_KEY);
858
862 return e; 859 return e;
863} 860}
864 861