[PATCH 01/15] dt-bindings: power: power-controller: Convert to yaml format

Peng Fan (OSS) posted 15 patches 3 weeks ago
[PATCH 01/15] dt-bindings: power: power-controller: Convert to yaml format
Posted by Peng Fan (OSS) 3 weeks ago
From: Peng Fan <peng.fan@nxp.com>

Convert power-controller.txt to yaml format. Drop the example because
there is already one in regulator/active-semi,act8846.yaml.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../devicetree/bindings/power/power-controller.txt | 17 ------------
 .../bindings/power/power-controller.yaml           | 30 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/power/power-controller.txt b/Documentation/devicetree/bindings/power/power-controller.txt
deleted file mode 100644
index e45affea80781292316c75ed387ba38402501c5b..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/power/power-controller.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* Generic system power control capability
-
-Power-management integrated circuits or miscellaneous hardware components are
-sometimes able to control the system power. The device driver associated with these
-components might need to define this capability, which tells the kernel that
-it can be used to switch off the system. The corresponding device must have the
-standard property "system-power-controller" in its device node. This property
-marks the device as able to control the system power. In order to test if this
-property is found programmatically, use the helper function
-"of_device_is_system_power_controller" from of.h .
-
-Example:
-
-act8846: act8846@5 {
-	 compatible = "active-semi,act8846";
-	 system-power-controller;
-}
diff --git a/Documentation/devicetree/bindings/power/power-controller.yaml b/Documentation/devicetree/bindings/power/power-controller.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..ff698365d778446c08ceeb5f3ef144d5e97d2f79
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/power-controller.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic System Power Control Capability
+
+maintainers:
+  - Rafael J. Wysocki <rafael@kernel.org>
+  - Ulf Hansson <ulf.hansson@linaro.org>
+
+description: |
+  Power-management integrated circuits or miscellaneous hardware components
+  are sometimes able to control the system power. The device driver associated
+  with these components might need to define this capability, which tells the
+  kernel that it can be used to switch off the system. The corresponding device
+  must have the standard property "system-power-controller" in its device node. This
+  property marks the device as able to control the system power.
+
+  In order to test if this property is found programmatically, use the helper
+  function "of_device_is_system_power_controller" from of.h.
+
+properties:
+  system-power-controller:
+    type: boolean
+    description:
+      Indicates that this device can be used to control the system power.
+
+additionalProperties: true

-- 
2.37.1
Re: [PATCH 01/15] dt-bindings: power: power-controller: Convert to yaml format
Posted by Krzysztof Kozlowski 3 weeks ago
On 16/03/2026 15:47, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Convert power-controller.txt to yaml format. Drop the example because
> there is already one in regulator/active-semi,act8846.yaml.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../devicetree/bindings/power/power-controller.txt | 17 ------------
>  .../bindings/power/power-controller.yaml           | 30 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/power-controller.txt b/Documentation/devicetree/bindings/power/power-controller.txt
> deleted file mode 100644
> index e45affea80781292316c75ed387ba38402501c5b..0000000000000000000000000000000000000000
> --- a/Documentation/devicetree/bindings/power/power-controller.txt
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -* Generic system power control capability
> -
> -Power-management integrated circuits or miscellaneous hardware components are
> -sometimes able to control the system power. The device driver associated with these
> -components might need to define this capability, which tells the kernel that
> -it can be used to switch off the system. The corresponding device must have the
> -standard property "system-power-controller" in its device node. This property
> -marks the device as able to control the system power. In order to test if this
> -property is found programmatically, use the helper function
> -"of_device_is_system_power_controller" from of.h .
> -
> -Example:
> -
> -act8846: act8846@5 {
> -	 compatible = "active-semi,act8846";
> -	 system-power-controller;
> -}
> diff --git a/Documentation/devicetree/bindings/power/power-controller.yaml b/Documentation/devicetree/bindings/power/power-controller.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..ff698365d778446c08ceeb5f3ef144d5e97d2f79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/power-controller.yaml
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

You relicensed the text, so you need to get some acks for that. Your
cover letter or patch changelog should explicitly ask for that and of
course you must Cc previous authors.


> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic System Power Control Capability
> +
> +maintainers:
> +  - Rafael J. Wysocki <rafael@kernel.org>
> +  - Ulf Hansson <ulf.hansson@linaro.org>
> +
> +description: |
> +  Power-management integrated circuits or miscellaneous hardware components
> +  are sometimes able to control the system power. The device driver associated
> +  with these components might need to define this capability, which tells the
> +  kernel that it can be used to switch off the system. The corresponding device
> +  must have the standard property "system-power-controller" in its device node. This
> +  property marks the device as able to control the system power.
> +
> +  In order to test if this property is found programmatically, use the helper
> +  function "of_device_is_system_power_controller" from of.h.
> +
> +properties:
> +  system-power-controller:
> +    type: boolean
> +    description:
> +      Indicates that this device can be used to control the system power.

Just like it was in case of other core properties, I think this should
go to dtschema.

Best regards,
Krzysztof
Re: [PATCH 01/15] dt-bindings: power: power-controller: Convert to yaml format
Posted by Peng Fan 2 weeks, 6 days ago
Hi Krzysztof,

On Mon, Mar 16, 2026 at 03:49:46PM +0100, Krzysztof Kozlowski wrote:
>On 16/03/2026 15:47, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>> 
>> Convert power-controller.txt to yaml format. Drop the example because
>> there is already one in regulator/active-semi,act8846.yaml.
>> 
>> +properties:
>> +  system-power-controller:
>> +    type: boolean
>> +    description:
>> +      Indicates that this device can be used to control the system power.
>
>Just like it was in case of other core properties, I think this should
>go to dtschema.

Thanks for giving a look. I just submited a PR
https://github.com/devicetree-org/dt-schema/pull/187

Thanks,
Peng

>
>Best regards,
>Krzysztof
>