Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: of: fix suspend-min/max-voltage parsing

Currently the regulator-suspend-min/max-microvolt must be within the
root regulator node but the dt-bindings specifies it as subnode
properties for the regulator-state-[mem/disk/standby] node. The only DT
using this bindings currently is the at91-sama5d2_xplained.dts and this
DT uses it correctly. I don't know if it isn't tested but it can't work
without this fix.

Fixes: f7efad10b5c4 ("regulator: add PM suspend and resume hooks")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20190917154021.14693-3-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Marco Felsch and committed by
Mark Brown
131cb121 c82f27df

+4 -4
+4 -4
drivers/regulator/of_regulator.c
··· 231 231 "regulator-off-in-suspend")) 232 232 suspend_state->enabled = DISABLE_IN_SUSPEND; 233 233 234 - if (!of_property_read_u32(np, "regulator-suspend-min-microvolt", 235 - &pval)) 234 + if (!of_property_read_u32(suspend_np, 235 + "regulator-suspend-min-microvolt", &pval)) 236 236 suspend_state->min_uV = pval; 237 237 238 - if (!of_property_read_u32(np, "regulator-suspend-max-microvolt", 239 - &pval)) 238 + if (!of_property_read_u32(suspend_np, 239 + "regulator-suspend-max-microvolt", &pval)) 240 240 suspend_state->max_uV = pval; 241 241 242 242 if (!of_property_read_u32(suspend_np,