Skip to contentSkip to conversation

mfd: rk808: Use standard system-power-controller property

PATCH In review Alexander Shiyan 2 participants 2 messages Jun 24, 2024 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: rk808: Use standard system-power-controller property

The old property "rockchip,system-power-controller" marked as deprecated.

---
 drivers/mfd/rk808.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rk808.c +1 -1
index adb9d8ca0a..8f766a3fa2 100644
@@ -366,7 +366,7 @@ static int rk808_probe(struct device *dev)
 	rk808->poweroff.poweroff = rk808_poweroff;
 	rk808->poweroff.priority = 200;
 
-	if (of_property_read_bool(np, "rockchip,system-power-controller"))
+	if (of_property_read_bool(np, "system-power-controller"))
 		rk808->poweroff.priority += 100;
 
 	poweroff_handler_register(&rk808->poweroff);
Signature · 1 line
2.38.2
#1 lore raw

Hello Alexander,

Thanks for your patch.

Quoted 12 lines · Alexander Shiyan

The old property "rockchip,system-power-controller" marked as deprecated.

---
 drivers/mfd/rk808.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rk808.c +0 -0
index adb9d8ca0a..8f766a3fa2 100644

drivers/mfd/rk808.c static int rk808_probe(struct device *dev) · line 370

Quoted 6 lines
drivers/mfd/rk808.c +1 -1
@@ -366,7 +366,7 @@ static int rk808_probe(struct device *dev)
 	rk808->poweroff.poweroff = rk808_poweroff;
 	rk808->poweroff.priority = 200;
 
-	if (of_property_read_bool(np, "rockchip,system-power-controller"))
+	if (of_property_read_bool(np, "system-power-controller"))
 		rk808->poweroff.priority += 100;

This change is only correct when all DTs we support cease to use the deprecated property. This is currently not the case, e.g. for rk3568-wolfvision-pf5-upstream.dts.

Until that's done, we should check both properties.

Thanks,
Ahmad

Quoted 2 lines
drivers/mfd/rk808.c +0 -0
 	poweroff_handler_register(&rk808->poweroff);
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |