arm: tegra: Add delay support in regulator
Alok Chauhan [Fri, 17 Feb 2012 09:41:01 +0000 (14:41 +0530)]
bug 939242

Change-Id: I552c664fbac5519cc97593ebec3884f716158887
Signed-off-by: Alok Chauhan <alokc@nvidia.com>
Reviewed-on: http://git-master/r/94499
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

arch/arm/mach-tegra/board-whistler-power.c

index 72389f1..a0eb668 100644 (file)
@@ -135,7 +135,11 @@ static struct regulator_consumer_supply max8907c_LDO20_supply[] = {
        REGULATOR_SUPPLY("vddio_hsic", NULL),
 };
 
-#define MAX8907C_REGULATOR_DEVICE(_id, _minmv, _maxmv)                 \
+static struct max8907c_chip_regulator_data ldo4_config = {
+       .enable_time_us = 10000,
+};
+
+#define MAX8907C_REGULATOR_DEVICE(_id, _minmv, _maxmv, config)                 \
 static struct regulator_init_data max8907c_##_id##_data = {            \
        .constraints = {                                                \
                .min_uV = (_minmv),                                     \
@@ -148,6 +152,7 @@ static struct regulator_init_data max8907c_##_id##_data = {         \
        },                                                              \
        .num_consumer_supplies = ARRAY_SIZE(max8907c_##_id##_supply),   \
        .consumer_supplies = max8907c_##_id##_supply,                   \
+       .driver_data = config,          \
 };                                                                     \
 static struct platform_device max8907c_##_id##_device = {              \
        .name   = "max8907c-regulator",                                 \
@@ -157,29 +162,29 @@ static struct platform_device max8907c_##_id##_device = {         \
        },                                                              \
 }
 
-MAX8907C_REGULATOR_DEVICE(SD1, 637500, 1425000);
-MAX8907C_REGULATOR_DEVICE(SD2, 637500, 1425000);
-MAX8907C_REGULATOR_DEVICE(SD3, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO1, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO2, 650000, 2225000);
-MAX8907C_REGULATOR_DEVICE(LDO3, 650000, 2225000);
-MAX8907C_REGULATOR_DEVICE(LDO4, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO5, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO6, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO7, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO8, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO9, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO10, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO11, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO12, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO13, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO14, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO15, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO16, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO17, 650000, 2225000);
-MAX8907C_REGULATOR_DEVICE(LDO18, 650000, 2225000);
-MAX8907C_REGULATOR_DEVICE(LDO19, 750000, 3900000);
-MAX8907C_REGULATOR_DEVICE(LDO20, 750000, 3900000);
+MAX8907C_REGULATOR_DEVICE(SD1, 637500, 1425000, NULL);
+MAX8907C_REGULATOR_DEVICE(SD2, 637500, 1425000, NULL);
+MAX8907C_REGULATOR_DEVICE(SD3, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO1, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO2, 650000, 2225000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO3, 650000, 2225000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO4, 750000, 3900000, &ldo4_config);
+MAX8907C_REGULATOR_DEVICE(LDO5, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO6, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO7, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO8, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO9, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO10, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO11, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO12, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO13, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO14, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO15, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO16, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO17, 650000, 2225000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO18, 650000, 2225000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO19, 750000, 3900000, NULL);
+MAX8907C_REGULATOR_DEVICE(LDO20, 750000, 3900000, NULL);
 
 static struct platform_device *whistler_max8907c_power_devices[] = {
        &max8907c_SD1_device,