usb: otg: twl4030-usb: switch over to defines in twl.h
authorFelipe Balbi <felipe.balbi@nokia.com>
Wed, 18 Aug 2010 06:19:37 +0000 (09:19 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:28:51 +0000 (00:28 +0200)
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>
drivers/usb/otg/twl4030-usb.c

index 0bc97698af157d2cc25e4309a0da34ac2ad4e317..d335f484fcd8dc2e58e8271c7334f08abfbee57f 100644 (file)
 #define PHY_DPLL_CLK                   (1 << 0)
 
 /* In module TWL4030_MODULE_PM_MASTER */
-#define PROTECT_KEY                    0x0E
 #define STS_HW_CONDITIONS              0x0F
 
 /* In module TWL4030_MODULE_PM_RECEIVER */
@@ -418,8 +417,13 @@ static void twl4030_phy_resume(struct twl4030_usb *twl)
 static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 {
        /* Enable writing to power configuration registers */
-       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0xC0, PROTECT_KEY);
-       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0x0C, PROTECT_KEY);
+       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
+                       TWL4030_PM_MASTER_KEY_CFG1,
+                       TWL4030_PM_MASTER_PROTECT_KEY);
+
+       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
+                       TWL4030_PM_MASTER_KEY_CFG2,
+                       TWL4030_PM_MASTER_PROTECT_KEY);
 
        /* Keep VUSB3V1 LDO in sleep state until VBUS/ID change detected*/
        /*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)
        twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
 
        /* disable access to power configuration registers */
-       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0, PROTECT_KEY);
+       twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0,
+                       TWL4030_PM_MASTER_PROTECT_KEY);
 
        return 0;