regulator: add regen regulator
[pandora-kernel.git] / drivers / regulator / twl-regulator.c
index b44f667..d1f3c10 100644 (file)
@@ -999,6 +999,20 @@ static struct regulator_ops twlsmps_ops = {
                }, \
        }
 
+#define TWL4030_FIXED_RESOURCE(label, offset, num, turnon_delay, remap_conf) { \
+       .base = offset, \
+       .id = num, \
+       .delay = turnon_delay, \
+       .remap = remap_conf, \
+       .desc = { \
+               .name = #label, \
+               .id = TWL4030_REG_##label, \
+               .ops = &twl4030fixed_ops, \
+               .type = REGULATOR_VOLTAGE, \
+               .owner = THIS_MODULE, \
+               }, \
+       }
+
 #define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) { \
        .base = offset, \
        .delay = turnon_delay, \
@@ -1052,6 +1066,8 @@ static struct twlreg_info twl_regs[] = {
        TWL4030_FIXED_LDO(VUSB3V1, 0x77, 3100, 19, 150, 0x08),
        /* VUSBCP is managed *only* by the USB subchip */
 
+       TWL4030_FIXED_RESOURCE(REGEN, 0x7f, 21, 10, 0x08), /* OD to VBAT */
+
        /* 6030 REG with base as PMC Slave Misc : 0x0030 */
        /* Turnon-delay and remap configuration values for 6030 are not
           verified since the specification is not public */