aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg/twl4030-usb.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-08-18 02:19:37 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-28 18:28:51 -0400
commite7944d820b1e13a5b17c3047e033bf744bcf01f1 (patch)
tree16fa208449d2729ef24aa439fb5e127d1bef45bb /drivers/usb/otg/twl4030-usb.c
parent71084406bc605621c61e3ec4776bd84f265d5df3 (diff)
usb: otg: twl4030-usb: switch 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/usb/otg/twl4030-usb.c')
-rw-r--r--drivers/usb/otg/twl4030-usb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 0bc97698af1..d335f484fcd 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -124,7 +124,6 @@
124#define PHY_DPLL_CLK (1 << 0) 124#define PHY_DPLL_CLK (1 << 0)
125 125
126/* In module TWL4030_MODULE_PM_MASTER */ 126/* In module TWL4030_MODULE_PM_MASTER */
127#define PROTECT_KEY 0x0E
128#define STS_HW_CONDITIONS 0x0F 127#define STS_HW_CONDITIONS 0x0F
129 128
130/* In module TWL4030_MODULE_PM_RECEIVER */ 129/* In module TWL4030_MODULE_PM_RECEIVER */
@@ -418,8 +417,13 @@ static void twl4030_phy_resume(struct twl4030_usb *twl)
418static int twl4030_usb_ldo_init(struct twl4030_usb *twl) 417static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
419{ 418{
420 /* Enable writing to power configuration registers */ 419 /* Enable writing to power configuration registers */
421 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0xC0, PROTECT_KEY); 420 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
422 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0x0C, PROTECT_KEY); 421 TWL4030_PM_MASTER_KEY_CFG1,
422 TWL4030_PM_MASTER_PROTECT_KEY);
423
424 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
425 TWL4030_PM_MASTER_KEY_CFG2,
426 TWL4030_PM_MASTER_PROTECT_KEY);
423 427
424 /* Keep VUSB3V1 LDO in sleep state until VBUS/ID change detected*/ 428 /* Keep VUSB3V1 LDO in sleep state until VBUS/ID change detected*/
425 /*twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2);*/ 429 /*twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2);*/
@@ -455,7 +459,8 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
455 twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE); 459 twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
456 460
457 /* disable access to power configuration registers */ 461 /* disable access to power configuration registers */
458 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0, PROTECT_KEY); 462 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0,
463 TWL4030_PM_MASTER_PROTECT_KEY);
459 464
460 return 0; 465 return 0;
461 466