summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski2015-01-05 12:48:42 +0100
committerMark Brown2015-01-08 21:15:45 +0100
commitbfa21a0dfe6915dc85953b5d40ea9dae5fdf205f (patch)
treea65674f6cf409a546fc2a62c74e3ab25261a4f4d /drivers/regulator/core.c
parentregulator: Copy config passed during registration (diff)
downloadkernel-qcow2-linux-bfa21a0dfe6915dc85953b5d40ea9dae5fdf205f.tar.gz
kernel-qcow2-linux-bfa21a0dfe6915dc85953b5d40ea9dae5fdf205f.tar.xz
kernel-qcow2-linux-bfa21a0dfe6915dc85953b5d40ea9dae5fdf205f.zip
regulator: Allow parsing custom properties when using simplified DT parsing
When drivers use simplified DT parsing method (they provide 'regulator_desc.of_match') they still may want to parse custom properties for some of the regulators. For example some of the regulators support GPIO enable control. Add a driver-supplied callback for such case. This way the regulator core parses common bindings offloading a lot of code from drivers and still custom properties may be used. The callback, called for each parsed regulator, may modify the 'regulator_config' initially passed to regulator_register(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c13b557a560e..5fae8cabd254 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3635,7 +3635,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
return ERR_PTR(-ENOMEM);
}
- init_data = regulator_of_get_init_data(dev, regulator_desc,
+ init_data = regulator_of_get_init_data(dev, regulator_desc, config,
&rdev->dev.of_node);
if (!init_data) {
init_data = config->init_data;