The following commit has been merged in the master branch: commit deed1d44699135e5af7678442607469d14a92141 Merge: 13b86bc4cd648eae69fdcf3d04b2750c76350053 77fd66c9ff3e992718a79fa6407148935d34b50f Author: Linus Torvalds torvalds@linux-foundation.org Date: Wed Oct 23 15:31:17 2019 -0400
Merge tag 'regulator-fix-v5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "There are a few core fixes here around error handling and handling if suspend mode configuration and some driver specific fixes here but the most important change is the fix to the fixed-regulator DT schema conversion introduced during the last merge window.
That fixes one of the last two errors preventing successful execution of "make dt_binding_check" which will be enormously helpful for DT schema development"
* tag 'regulator-fix-v5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom-rpmh: Fix PMIC5 BoB min voltage regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized regulator: lochnagar: Add on_off_delay for VDDCORE regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone regulator: da9062: fix suspend_enable/disable preparation dt-bindings: fixed-regulator: fix compatible enum regulator: fixed: Prevent NULL pointer dereference when !CONFIG_OF regulator: core: make regulator_register() EPROBE_DEFER aware regulator: of: fix suspend-min/max-voltage parsing
diff --combined drivers/regulator/of_regulator.c index afefb29ce1b0,ef7198b76e50..87637eb6bcbc --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@@ -231,12 -231,12 +231,12 @@@ static int of_get_regulation_constraint "regulator-off-in-suspend")) suspend_state->enabled = DISABLE_IN_SUSPEND;
- if (!of_property_read_u32(np, "regulator-suspend-min-microvolt", - &pval)) + if (!of_property_read_u32(suspend_np, + "regulator-suspend-min-microvolt", &pval)) suspend_state->min_uV = pval;
- if (!of_property_read_u32(np, "regulator-suspend-max-microvolt", - &pval)) + if (!of_property_read_u32(suspend_np, + "regulator-suspend-max-microvolt", &pval)) suspend_state->max_uV = pval;
if (!of_property_read_u32(suspend_np, @@@ -445,11 -445,20 +445,20 @@@ struct regulator_init_data *regulator_o goto error; }
- if (desc->of_parse_cb && desc->of_parse_cb(child, desc, config)) { - dev_err(dev, - "driver callback failed to parse DT for regulator %pOFn\n", - child); - goto error; + if (desc->of_parse_cb) { + int ret; + + ret = desc->of_parse_cb(child, desc, config); + if (ret) { + if (ret == -EPROBE_DEFER) { + of_node_put(child); + return ERR_PTR(-EPROBE_DEFER); + } + dev_err(dev, + "driver callback failed to parse DT for regulator %pOFn\n", + child); + goto error; + } }
*node = child; @@@ -462,11 -471,16 +471,11 @@@ error return NULL; }
-static int of_node_match(struct device *dev, const void *data) -{ - return dev->of_node == data; -} - struct regulator_dev *of_find_regulator_by_node(struct device_node *np) { struct device *dev;
- dev = class_find_device(®ulator_class, NULL, np, of_node_match); + dev = class_find_device_by_of_node(®ulator_class, np);
return dev ? dev_to_rdev(dev) : NULL; }
linux-merge@lists.open-mesh.org