summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65132-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-11-22 19:56:20 +0000
committerMark Brown <broonie@kernel.org>2019-11-22 19:56:20 +0000
commita21da94f617bce0771144ea8093b6987184b38d0 (patch)
treeca8fe8bcd71f07a9215e6ac3a584fc22a45a3d8b /drivers/regulator/tps65132-regulator.c
parentc642e87086847d7f61b7b7d8744ac23e44cac91e (diff)
parentc15d5a645875bc9b89f68f5d3fb608f691ac78d7 (diff)
downloadlinux-a21da94f617bce0771144ea8093b6987184b38d0.tar.bz2
Merge branch 'regulator-5.5' into regulator-next
Diffstat (limited to 'drivers/regulator/tps65132-regulator.c')
-rw-r--r--drivers/regulator/tps65132-regulator.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/regulator/tps65132-regulator.c b/drivers/regulator/tps65132-regulator.c
index e302bd01a084..7b0e38f8d627 100644
--- a/drivers/regulator/tps65132-regulator.c
+++ b/drivers/regulator/tps65132-regulator.c
@@ -136,9 +136,10 @@ static int tps65132_of_parse_cb(struct device_node *np,
struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[desc->id];
int ret;
- rpdata->en_gpiod = devm_fwnode_get_index_gpiod_from_child(tps->dev,
- "enable", 0, &np->fwnode, 0, "enable");
- if (IS_ERR_OR_NULL(rpdata->en_gpiod)) {
+ rpdata->en_gpiod = devm_fwnode_gpiod_get(tps->dev, of_fwnode_handle(np),
+ "enable", GPIOD_ASIS,
+ "enable");
+ if (IS_ERR(rpdata->en_gpiod)) {
ret = PTR_ERR(rpdata->en_gpiod);
/* Ignore the error other than probe defer */
@@ -147,10 +148,12 @@ static int tps65132_of_parse_cb(struct device_node *np,
return 0;
}
- rpdata->act_dis_gpiod = devm_fwnode_get_index_gpiod_from_child(
- tps->dev, "active-discharge", 0,
- &np->fwnode, 0, "active-discharge");
- if (IS_ERR_OR_NULL(rpdata->act_dis_gpiod)) {
+ rpdata->act_dis_gpiod = devm_fwnode_gpiod_get(tps->dev,
+ of_fwnode_handle(np),
+ "active-discharge",
+ GPIOD_ASIS,
+ "active-discharge");
+ if (IS_ERR(rpdata->act_dis_gpiod)) {
ret = PTR_ERR(rpdata->act_dis_gpiod);
/* Ignore the error other than probe defer */