[PATCH] power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator

AngeloGioacchino Del Regno posted 1 patch 5 months, 1 week ago
drivers/power/supply/mt6360_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator
Posted by AngeloGioacchino Del Regno 5 months, 1 week ago
The of_match shall correspond to the name of the regulator subnode,
or the deprecated `regulator-compatible` property must be used:
failing to do so, the regulator won't probe (and the driver will
as well not probe).

Since the devicetree binding for this driver is actually correct
and wants DTs to use the "usb-otg-vbus-regulator" subnode name,
fix this driver by aligning the `of_match` string to what the DT
binding wants.

Fixes: 0402e8ebb8b8 ("power: supply: mt6360_charger: add MT6360 charger support")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 drivers/power/supply/mt6360_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/mt6360_charger.c b/drivers/power/supply/mt6360_charger.c
index 1305cba61edd..aca123783efc 100644
--- a/drivers/power/supply/mt6360_charger.c
+++ b/drivers/power/supply/mt6360_charger.c
@@ -588,7 +588,7 @@ static const struct regulator_ops mt6360_chg_otg_ops = {
 };
 
 static const struct regulator_desc mt6360_otg_rdesc = {
-	.of_match = "usb-otg-vbus",
+	.of_match = "usb-otg-vbus-regulator",
 	.name = "usb-otg-vbus",
 	.ops = &mt6360_chg_otg_ops,
 	.owner = THIS_MODULE,
-- 
2.44.0
Re: [PATCH] power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator
Posted by Sebastian Reichel 5 months, 1 week ago
On Wed, 10 Apr 2024 10:44:05 +0200, AngeloGioacchino Del Regno wrote:
> The of_match shall correspond to the name of the regulator subnode,
> or the deprecated `regulator-compatible` property must be used:
> failing to do so, the regulator won't probe (and the driver will
> as well not probe).
> 
> Since the devicetree binding for this driver is actually correct
> and wants DTs to use the "usb-otg-vbus-regulator" subnode name,
> fix this driver by aligning the `of_match` string to what the DT
> binding wants.
> 
> [...]

Applied, thanks!

[1/1] power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator
      commit: bcbdcffd94ce21c8aeaa43f223373848fd1202be

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>
Re: [PATCH] power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator
Posted by Chen-Yu Tsai 5 months, 1 week ago
On Wed, Apr 10, 2024 at 4:44 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> The of_match shall correspond to the name of the regulator subnode,
> or the deprecated `regulator-compatible` property must be used:
> failing to do so, the regulator won't probe (and the driver will
> as well not probe).
>
> Since the devicetree binding for this driver is actually correct
> and wants DTs to use the "usb-otg-vbus-regulator" subnode name,
> fix this driver by aligning the `of_match` string to what the DT
> binding wants.
>
> Fixes: 0402e8ebb8b8 ("power: supply: mt6360_charger: add MT6360 charger support")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>