Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220577
b: refs/heads/master
c: 49e6f87
h: refs/heads/master
i:
  220575: 612d688
v: v3
  • Loading branch information
Felipe Balbi authored and Samuel Ortiz committed Oct 28, 2010
1 parent 646635e commit 9092e58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89712059c09ff12f1e60e444d05d2ca257dd00ef
refs/heads/master: 49e6f87eb6bcdc40663958f938e4b919dca47f40
21 changes: 9 additions & 12 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@

/* Few power values */
#define R_CFG_BOOT 0x05
#define R_PROTECT_KEY 0x0E

/* access control values for R_PROTECT_KEY */
#define KEY_UNLOCK1 0xce
#define KEY_UNLOCK2 0xec
#define KEY_LOCK 0x00

/* some fields in R_CFG_BOOT */
#define HFCLK_FREQ_19p2_MHZ (1 << 0)
Expand Down Expand Up @@ -846,19 +840,22 @@ static inline int __init protect_pm_master(void)
{
int e = 0;

e = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_LOCK,
R_PROTECT_KEY);
e = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0,
TWL4030_PM_MASTER_PROTECT_KEY);
return e;
}

static inline int __init unprotect_pm_master(void)
{
int e = 0;

e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK1,
R_PROTECT_KEY);
e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK2,
R_PROTECT_KEY);
e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
TWL4030_PM_MASTER_KEY_CFG1,
TWL4030_PM_MASTER_PROTECT_KEY);
e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
TWL4030_PM_MASTER_KEY_CFG2,
TWL4030_PM_MASTER_PROTECT_KEY);

return e;
}

Expand Down

0 comments on commit 9092e58

Please sign in to comment.