aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/mfd/tps65910.txt33
-rw-r--r--drivers/regulator/tps65910-regulator.c11
-rw-r--r--include/linux/mfd/tps65910.h2
3 files changed, 23 insertions, 23 deletions
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt
index 31be5a3d9f76..d2802d4717bc 100644
--- a/Documentation/devicetree/bindings/mfd/tps65910.txt
+++ b/Documentation/devicetree/bindings/mfd/tps65910.txt
@@ -25,17 +25,12 @@ Required properties:
25 tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, 25 tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5,
26 ldo6, ldo7, ldo8 26 ldo6, ldo7, ldo8
27 27
28Optional properties:
29- ti,vmbch-threshold: (tps65911) main battery charged threshold
30 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
31- ti,vmbch2-threshold: (tps65911) main battery discharged threshold
32 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
33- ti,en-gpio-sleep: enable sleep control for gpios
34 There should be 9 entries here, one for each gpio.
35- xxx-supply: Input voltage supply regulator. 28- xxx-supply: Input voltage supply regulator.
36 Missing of these properties will be assume as there is no supply regulator 29 These entries are require if regulators are enabled for a device. Missing of these
37 for that input pins and always powered on. 30 properties can cause the regulator registration fails.
38 The valid input supply properties are: 31 If some of input supply is powered through battery or always-on supply then
32 also it is require to have these parameters with proper node handle of always
33 on power supply.
39 tps65910: 34 tps65910:
40 vcc1-supply: VDD1 input. 35 vcc1-supply: VDD1 input.
41 vcc2-supply: VDD2 input. 36 vcc2-supply: VDD2 input.
@@ -55,6 +50,16 @@ Optional properties:
55 vcc7-supply: VRTC input. 50 vcc7-supply: VRTC input.
56 vccio-supply: VIO input. 51 vccio-supply: VIO input.
57 52
53Optional properties:
54- ti,vmbch-threshold: (tps65911) main battery charged threshold
55 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
56- ti,vmbch2-threshold: (tps65911) main battery discharged threshold
57 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
58- ti,en-ck32k-xtal: enable external 32-kHz crystal oscillator (see CK32K_CTRL
59 in TPS6591X datasheet)
60- ti,en-gpio-sleep: enable sleep control for gpios
61 There should be 9 entries here, one for each gpio.
62
58Regulator Optional properties: 63Regulator Optional properties:
59- ti,regulator-ext-sleep-control: enable external sleep 64- ti,regulator-ext-sleep-control: enable external sleep
60 control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)] 65 control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)]
@@ -79,8 +84,14 @@ Example:
79 84
80 ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>; 85 ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>;
81 86
82 vcc7-supply = <&reg_parent>;
83 vcc1-supply = <&reg_parent>; 87 vcc1-supply = <&reg_parent>;
88 vcc2-supply = <&some_reg>;
89 vcc3-supply = <...>;
90 vcc4-supply = <...>;
91 vcc5-supply = <...>;
92 vcc6-supply = <...>;
93 vcc7-supply = <...>;
94 vccio-supply = <...>;
84 95
85 regulators { 96 regulators {
86 #address-cells = <1>; 97 #address-cells = <1>;
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;
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index 1aca1fbbc138..6c4c478e21a4 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -799,7 +799,6 @@ struct tps65910_sleep_keepon_data {
799/** 799/**
800 * struct tps65910_board 800 * struct tps65910_board
801 * Board platform data may be used to initialize regulators. 801 * Board platform data may be used to initialize regulators.
802 * @input_supply: Name of input supply regulator.
803 */ 802 */
804 803
805struct tps65910_board { 804struct tps65910_board {
@@ -812,7 +811,6 @@ struct tps65910_board {
812 struct tps65910_sleep_keepon_data *slp_keepon; 811 struct tps65910_sleep_keepon_data *slp_keepon;
813 bool en_gpio_sleep[TPS6591X_MAX_NUM_GPIO]; 812 bool en_gpio_sleep[TPS6591X_MAX_NUM_GPIO];
814 unsigned long regulator_ext_sleep_control[TPS65910_NUM_REGS]; 813 unsigned long regulator_ext_sleep_control[TPS65910_NUM_REGS];
815 const char *input_supply[TPS65910_NUM_REGS];
816 struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS]; 814 struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS];
817}; 815};
818 816