Re: [PATCH 02/10] dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

[email protected]
Newsgroups org.kernel.vger.linux-devicetree,dev.linux.lists.mfd
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The device tree binding deprecates the vendor-specific `ti,system-power-controller` in favor of the generic `system-power-controller` property, but the driver has not been updated to support it, which will silently break system power-off functionality if device trees are migrated.
--

--- Patch [2]: [PATCH 02/10] dt-bindings: mfd: ti,tps65910: Use generic power-controller schema ---
commit ccd015dacbaad9942d09e771f8332a54d584d02f
Author: Peng Fan <[email protected]>

dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

This commit deprecates the vendor-specific "ti,system-power-controller"
property in favor of the generic "system-power-controller". It also includes
a reference to the common power-controller.yaml schema.

> diff --git a/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml b/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
> index f1a76f88fc0cd..3939e8518a8e7 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
> @@ -72,6 +72,7 @@ properties:
>    ti,system-power-controller:
>      type: boolean
>      description: Identify whether or not this pmic controls the system power
> +    deprecated: true
>  
>    ti,sleep-enable:
>      type: boolean
[ ... ]
> @@ -216,7 +218,7 @@ examples:
>              #interrupt-cells = <2>;
>              interrupt-controller;
>  
> -            ti,system-power-controller;
> +            system-power-controller;
>  
>              ti,vmbch-threshold = <0>;
>              ti,vmbch2-threshold = <0>;

[Severity: High]
If a user updates their device tree to use the generic property as
recommended by this new example, will system power-off functionality
silently fail?

Looking at the driver, it appears to only check for the deprecated vendor
property:

drivers/mfd/tps65910.c:tps65910_parse_dt() {
    ...
	board_info->pm_off = of_property_read_bool(np,
			"ti,system-power-controller");
    ...
}

If the new generic property is used instead of the vendor one in the DT,
tps65910_parse_dt() will leave pm_off as false, preventing pm_power_off
from being registered. 

Should the driver be updated to support the generic property (for example,
by using of_device_is_system_power_controller()) alongside this binding
change?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.