Skip to content

Commit 395d68e

Browse files
committed
Merge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown: "One fix for sy7636a which got confused about which device to use to manage the lifecycle of the power good GPIO because it's looked up from the parent device due to the way DT bindings work" * tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: sy7636a: fix lifecycle of power good gpio
2 parents b891d11 + c05d0b3 commit 395d68e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/regulator/sy7636a-regulator.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
8383
if (!regmap)
8484
return -EPROBE_DEFER;
8585

86-
gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN);
86+
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
87+
88+
gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
8789
if (IS_ERR(gdp)) {
88-
dev_err(pdev->dev.parent, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
90+
dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
8991
return PTR_ERR(gdp);
9092
}
9193

@@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
105107
}
106108

107109
config.dev = &pdev->dev;
108-
config.dev->of_node = pdev->dev.parent->of_node;
109110
config.regmap = regmap;
110111

111112
rdev = devm_regulator_register(&pdev->dev, &desc, &config);

0 commit comments

Comments
 (0)