diff options
author | Andrew F. Davis <afd@ti.com> | 2017-02-10 12:55:47 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-02-13 13:04:28 -0500 |
commit | 6308f1787fb85bc98b7241a08a9f7f33b47f8b61 (patch) | |
tree | 134f79980969a53fa0b89b67d13e08cb68760de5 | |
parent | 1c47f7c316de38c30b481e1886cc6352c9efdcc1 (diff) |
regulator: tps65086: Fix DT node referencing in of_parse_cb
When we check for additional DT properties in the current node we
use the device_node passed in with the configuration data, this
will not point to the correct DT node, use the one passed in
for this purpose.
Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC")
Reported-by: Steven Kipisz <s-kipisz2@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Tested-by: Steven Kipisz <s-kipisz2@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/tps65086-regulator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/tps65086-regulator.c b/drivers/regulator/tps65086-regulator.c index 84e8cb109269..45e96e154690 100644 --- a/drivers/regulator/tps65086-regulator.c +++ b/drivers/regulator/tps65086-regulator.c | |||
@@ -162,14 +162,14 @@ static struct tps65086_regulator regulators[] = { | |||
162 | TPS65086_SWITCH("VTT", "vtt", VTT, TPS65086_SWVTT_EN, BIT(4)), | 162 | TPS65086_SWITCH("VTT", "vtt", VTT, TPS65086_SWVTT_EN, BIT(4)), |
163 | }; | 163 | }; |
164 | 164 | ||
165 | static int tps65086_of_parse_cb(struct device_node *dev, | 165 | static int tps65086_of_parse_cb(struct device_node *node, |
166 | const struct regulator_desc *desc, | 166 | const struct regulator_desc *desc, |
167 | struct regulator_config *config) | 167 | struct regulator_config *config) |
168 | { | 168 | { |
169 | int ret; | 169 | int ret; |
170 | 170 | ||
171 | /* Check for 25mV step mode */ | 171 | /* Check for 25mV step mode */ |
172 | if (of_property_read_bool(config->of_node, "ti,regulator-step-size-25mv")) { | 172 | if (of_property_read_bool(node, "ti,regulator-step-size-25mv")) { |
173 | switch (desc->id) { | 173 | switch (desc->id) { |
174 | case BUCK1: | 174 | case BUCK1: |
175 | case BUCK2: | 175 | case BUCK2: |
@@ -193,7 +193,7 @@ static int tps65086_of_parse_cb(struct device_node *dev, | |||
193 | } | 193 | } |
194 | 194 | ||
195 | /* Check for decay mode */ | 195 | /* Check for decay mode */ |
196 | if (desc->id <= BUCK6 && of_property_read_bool(config->of_node, "ti,regulator-decay")) { | 196 | if (desc->id <= BUCK6 && of_property_read_bool(node, "ti,regulator-decay")) { |
197 | ret = regmap_write_bits(config->regmap, | 197 | ret = regmap_write_bits(config->regmap, |
198 | regulators[desc->id].decay_reg, | 198 | regulators[desc->id].decay_reg, |
199 | regulators[desc->id].decay_mask, | 199 | regulators[desc->id].decay_mask, |