diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-07-17 02:04:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-17 06:08:46 -0400 |
commit | d2cfdb055d77f8d0864d75adfc1a3f0e0ec40e69 (patch) | |
tree | 0bfa3a3761644d6c08eab0814bd9a1dccc619062 /drivers/regulator/tps65910-regulator.c | |
parent | 8a165df7a915cb212f41c1dec9abc5ac8f8ee6b6 (diff) |
regulator: tps65910: set input_supply on desc unconditionally
Set the supply_name in the regulator descriptor unconditionally
and make this parameter as required parameter in the device
node for successfully registration of the regulator.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps65910-regulator.c')
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index d2ba066c0957..793adda560c3 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
@@ -1001,9 +1001,6 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( | |||
1001 | *tps65910_reg_matches = matches; | 1001 | *tps65910_reg_matches = matches; |
1002 | 1002 | ||
1003 | for (idx = 0; idx < count; idx++) { | 1003 | for (idx = 0; idx < count; idx++) { |
1004 | struct tps_info *info = matches[idx].driver_data; | ||
1005 | char in_supply[32]; /* 32 is max size of property name */ | ||
1006 | |||
1007 | if (!matches[idx].init_data || !matches[idx].of_node) | 1004 | if (!matches[idx].init_data || !matches[idx].of_node) |
1008 | continue; | 1005 | continue; |
1009 | 1006 | ||
@@ -1015,12 +1012,6 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( | |||
1015 | if (!ret) | 1012 | if (!ret) |
1016 | pmic_plat_data->regulator_ext_sleep_control[idx] = prop; | 1013 | pmic_plat_data->regulator_ext_sleep_control[idx] = prop; |
1017 | 1014 | ||
1018 | if (info->vin_name) { | ||
1019 | snprintf(in_supply, 32, "%s-supply", info->vin_name); | ||
1020 | if (of_find_property(np, in_supply, 0)) | ||
1021 | pmic_plat_data->input_supply[idx] = | ||
1022 | info->vin_name; | ||
1023 | } | ||
1024 | } | 1015 | } |
1025 | 1016 | ||
1026 | return pmic_plat_data; | 1017 | return pmic_plat_data; |
@@ -1123,7 +1114,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev) | |||
1123 | pmic->info[i] = info; | 1114 | pmic->info[i] = info; |
1124 | 1115 | ||
1125 | pmic->desc[i].name = info->name; | 1116 | pmic->desc[i].name = info->name; |
1126 | pmic->desc[i].supply_name = pmic_plat_data->input_supply[i]; | 1117 | pmic->desc[i].supply_name = info->vin_name; |
1127 | pmic->desc[i].id = i; | 1118 | pmic->desc[i].id = i; |
1128 | pmic->desc[i].n_voltages = info->n_voltages; | 1119 | pmic->desc[i].n_voltages = info->n_voltages; |
1129 | pmic->desc[i].enable_time = info->enable_time_us; | 1120 | pmic->desc[i].enable_time = info->enable_time_us; |