diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-10-26 09:32:19 +0800 |
---|---|---|
committer | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-11-13 14:50:10 +0800 |
commit | 2e31c77b8d8312bd87cd1e21427a9a94dcf26eaa (patch) | |
tree | 7e821859f5f3827ac10796c730f096a9cc0077e5 | |
parent | ba94b768e206bc304329b5ee2fc86c46be11102b (diff) |
regulator: hi6421: add supplier featuretracking-hilt-regulator-1113
Example: ldo0 supplies ldo1
dts:
ldo1: ldo@21 {
ldo-supply = <&ldo0>;
};
If supplier is register first, regulator is register successfully with supplier
If suplier is register late, regulator probe will be defered automatically,
while driver using such regulator may handle accordingly
Or change the supplier regulator sequence in dts
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Zhiliang Xue <xuezhiliang@huawei.com>
-rw-r--r-- | drivers/regulator/hi6421-regulator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c index a48c9501030a..083e2c3d83ca 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b/drivers/regulator/hi6421-regulator.c @@ -503,6 +503,9 @@ static int hi6421_regulator_probe(struct platform_device *pdev) rdesc = &sreg->rdesc; rdesc->name = sreg->name; rdesc->min_uV = initdata->constraints.min_uV; + if (of_get_property(np, "ldo-supply", NULL)) { + rdesc->supply_name = "ldo"; + } /* to parse device tree data for regulator specific */ ret = sreg->dt_parse(sreg, pdev); |