regulator: Fix for v6.17

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.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmjFYoQACgkQJNaLcl1U
 h9A5dgf+ITq9vjSnnGw2RKk7AATDIe9YQZQoqadKVrHwEbv2J1iH2MxCXttKz6JQ
 DL0p/B6QpT64Df/FztrX24AQsK+cUZOnKsrKW7uEKTUcbrC2fInr9jQ1BEwHb/ch
 4/mURACeO7YsXGEET3r6voT4HaAeApaB6InPeGcnvWWA7DZBZ+yNp94nCCu+tk6k
 U/7lrHByGkyablCvNhq2RrSbI17kasBdq6Tvt3XI7tCmvy7Aqjp4QsEkttS9yYE+
 U/RGDoO+OzvXcZ6C6oeJKn7sdsDukcakTzFZBSldt4oS08CatZOynyJSM6y2DZx1
 sfCICr3qssLJRdMl0I1G/0dJt9XZ5A==
 =6rOw
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2025-09-13 10:40:50 -07:00
commit 395d68e5dd

View File

@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
if (!regmap)
return -EPROBE_DEFER;
gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN);
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
if (IS_ERR(gdp)) {
dev_err(pdev->dev.parent, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
return PTR_ERR(gdp);
}
@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
}
config.dev = &pdev->dev;
config.dev->of_node = pdev->dev.parent->of_node;
config.regmap = regmap;
rdev = devm_regulator_register(&pdev->dev, &desc, &config);