2024-03-22 19:24:58

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 0/5] dt-bindings: hwmon: convert multiple devices to dtschema

This series converts the following existing bindings to dtschema:

- as370
- ibmpowernv (renamed to ibm,opal-sensor to match compatibles)
- stts751
- ibm,p8-occ-hwmon (moved to trivial-devices.yaml)

Additionally, pwm-fan.txt has been dropped because it was converted a
year ago, and it is not mentioned anywhere in the tree.
I could not find the rationale, but its current state does not seem to
provide any valuable information.

Signed-off-by: Javier Carrasco <[email protected]>
---
Changes in v3:
- Rename ibmpowernv to ibm,opal-sensor to match compatibles.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- ibmpowernv: fix compatible string in the example.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Javier Carrasco (5):
dt-bindings: hwmon: as370: convert to dtschema
dt-bindings: hwmon: ibmpowernv: convert to dtschema
dt-bindings: hwmon: pwm-fan: drop text file
dt-bindings: hwmon: stts751: convert to dtschema
dt-bindings: hwmon: ibm,p8-occ-hwmon: move to trivial devices

Documentation/devicetree/bindings/hwmon/as370.txt | 11 ------
.../devicetree/bindings/hwmon/ibm,opal-sensor.yaml | 37 +++++++++++++++++++
.../devicetree/bindings/hwmon/ibm,p8-occ-hwmon.txt | 25 -------------
.../devicetree/bindings/hwmon/ibmpowernv.txt | 23 ------------
.../devicetree/bindings/hwmon/pwm-fan.txt | 1 -
.../devicetree/bindings/hwmon/st,stts751.yaml | 41 ++++++++++++++++++++++
.../devicetree/bindings/hwmon/stts751.txt | 15 --------
.../devicetree/bindings/hwmon/syna,as370.yaml | 32 +++++++++++++++++
.../devicetree/bindings/trivial-devices.yaml | 2 ++
9 files changed, 112 insertions(+), 75 deletions(-)
---
base-commit: ebc9bee8814d12ec247de117aa2f7fd39ff11127
change-id: 20240320-hwmon_dtschema-7f58f49118aa

Best regards,
--
Javier Carrasco <[email protected]>



2024-03-22 19:25:04

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 1/5] dt-bindings: hwmon: as370: convert to dtschema

Convert existing binding to support validation.

This is a straightforward conversion with now new properties.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
Documentation/devicetree/bindings/hwmon/as370.txt | 11 --------
.../devicetree/bindings/hwmon/syna,as370.yaml | 32 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/as370.txt b/Documentation/devicetree/bindings/hwmon/as370.txt
deleted file mode 100644
index d102fe765124..000000000000
--- a/Documentation/devicetree/bindings/hwmon/as370.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Bindings for Synaptics AS370 PVT sensors
-
-Required properties:
-- compatible : "syna,as370-hwmon"
-- reg : address and length of the register set.
-
-Example:
- hwmon@ea0810 {
- compatible = "syna,as370-hwmon";
- reg = <0xea0810 0xc>;
- };
diff --git a/Documentation/devicetree/bindings/hwmon/syna,as370.yaml b/Documentation/devicetree/bindings/hwmon/syna,as370.yaml
new file mode 100644
index 000000000000..1f7005f55247
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/syna,as370.yaml
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/syna,as370.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics AS370 PVT sensors
+
+maintainers:
+ - Javier Carrasco <[email protected]>
+
+properties:
+ compatible:
+ const: syna,as370-hwmon
+
+ reg:
+ description:
+ Address and length of the register set.
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ sensor@ea0810 {
+ compatible = "syna,as370-hwmon";
+ reg = <0xea0810 0xc>;
+ };

--
2.40.1


2024-03-22 19:25:27

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 3/5] dt-bindings: hwmon: pwm-fan: drop text file

This binding was converted to dtschema a year ago.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
Documentation/devicetree/bindings/hwmon/pwm-fan.txt | 1 -
1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
deleted file mode 100644
index 48886f0ce415..000000000000
--- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file has moved to pwm-fan.yaml.

--
2.40.1


2024-03-22 19:25:47

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 4/5] dt-bindings: hwmon: stts751: convert to dtschema

Convert existing binding to support validation.

This is a straightforward conversion with no new properties.

Reviewed-by: Conor Dooley <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/hwmon/st,stts751.yaml | 41 ++++++++++++++++++++++
.../devicetree/bindings/hwmon/stts751.txt | 15 --------
2 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/st,stts751.yaml b/Documentation/devicetree/bindings/hwmon/st,stts751.yaml
new file mode 100644
index 000000000000..9c825adbed58
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/st,stts751.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/st,stts751.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STTS751 Thermometer
+
+maintainers:
+ - Javier Carrasco <[email protected]>
+
+properties:
+ compatible:
+ const: st,stts751
+
+ reg:
+ maxItems: 1
+
+ smbus-timeout-disable:
+ description:
+ When set, the smbus timeout function will be disabled.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ thermometer@48 {
+ compatible = "st,stts751";
+ reg = <0x48>;
+ smbus-timeout-disable;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/hwmon/stts751.txt b/Documentation/devicetree/bindings/hwmon/stts751.txt
deleted file mode 100644
index 3ee1dc30e72f..000000000000
--- a/Documentation/devicetree/bindings/hwmon/stts751.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-* STTS751 thermometer.
-
-Required node properties:
-- compatible: "stts751"
-- reg: I2C bus address of the device
-
-Optional properties:
-- smbus-timeout-disable: when set, the smbus timeout function will be disabled
-
-Example stts751 node:
-
-temp-sensor {
- compatible = "stts751";
- reg = <0x48>;
-}

--
2.40.1


2024-03-22 19:25:54

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 2/5] dt-bindings: hwmon: ibmpowernv: convert to dtschema

Convert existing binding to support validation.

The binding has been renamed to match its compatible strings, with no
further additions.

Reviewed-by: Conor Dooley <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/hwmon/ibm,opal-sensor.yaml | 37 ++++++++++++++++++++++
.../devicetree/bindings/hwmon/ibmpowernv.txt | 23 --------------
2 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ibm,opal-sensor.yaml b/Documentation/devicetree/bindings/hwmon/ibm,opal-sensor.yaml
new file mode 100644
index 000000000000..376ee7f1cdb7
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ibm,opal-sensor.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/ibm,opal-sensor.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM POWERNV platform sensors
+
+maintainers:
+ - Javier Carrasco <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - ibm,opal-sensor-cooling-fan
+ - ibm,opal-sensor-amb-temp
+ - ibm,opal-sensor-power-supply
+ - ibm,opal-sensor-power
+
+ sensor-id:
+ description:
+ An opaque id provided by the firmware to the kernel, identifies a
+ given sensor and its attribute data.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - sensor-id
+
+additionalProperties: false
+
+examples:
+ - |
+ sensor {
+ compatible = "ibm,opal-sensor-cooling-fan";
+ sensor-id = <0x7052107>;
+ };
diff --git a/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt b/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt
deleted file mode 100644
index f93242be60a1..000000000000
--- a/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-IBM POWERNV platform sensors
-----------------------------
-
-Required node properties:
-- compatible: must be one of
- "ibm,opal-sensor-cooling-fan"
- "ibm,opal-sensor-amb-temp"
- "ibm,opal-sensor-power-supply"
- "ibm,opal-sensor-power"
-- sensor-id: an opaque id provided by the firmware to the kernel, identifies a
- given sensor and its attribute data
-
-Example sensors node:
-
-cooling-fan#8-data {
- sensor-id = <0x7052107>;
- compatible = "ibm,opal-sensor-cooling-fan";
-};
-
-amb-temp#1-thrs {
- sensor-id = <0x5096000>;
- compatible = "ibm,opal-sensor-amb-temp";
-};

--
2.40.1


2024-03-22 19:25:59

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v3 5/5] dt-bindings: hwmon: ibm,p8-occ-hwmon: move to trivial devices

This binding meets the requirements to be converted to dtschema
via trivial-devices.yaml.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/hwmon/ibm,p8-occ-hwmon.txt | 25 ----------------------
.../devicetree/bindings/trivial-devices.yaml | 2 ++
2 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ibm,p8-occ-hwmon.txt b/Documentation/devicetree/bindings/hwmon/ibm,p8-occ-hwmon.txt
deleted file mode 100644
index 5dc5d2e2573d..000000000000
--- a/Documentation/devicetree/bindings/hwmon/ibm,p8-occ-hwmon.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Device-tree bindings for I2C-based On-Chip Controller hwmon device
-------------------------------------------------------------------
-
-Required properties:
- - compatible = "ibm,p8-occ-hwmon";
- - reg = <I2C address>; : I2C bus address
-
-Examples:
-
- i2c-bus@100 {
- #address-cells = <1>;
- #size-cells = <0>;
- clock-frequency = <100000>;
- < more properties >
-
- occ-hwmon@1 {
- compatible = "ibm,p8-occ-hwmon";
- reg = <0x50>;
- };
-
- occ-hwmon@2 {
- compatible = "ibm,p8-occ-hwmon";
- reg = <0x51>;
- };
- };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index e07be7bf8395..87b0dd9b0734 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -126,6 +126,8 @@ properties:
- ibm,cffps1
# IBM Common Form Factor Power Supply Versions 2
- ibm,cffps2
+ # IBM On-Chip Controller hwmon device
+ - ibm,p8-occ-hwmon
# Infineon barometric pressure and temperature sensor
- infineon,dps310
# Infineon IR36021 digital POL buck controller

--
2.40.1


2024-03-23 14:16:25

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH v3 1/5] dt-bindings: hwmon: as370: convert to dtschema

On Fri, Mar 22, 2024 at 08:24:35PM +0100, Javier Carrasco wrote:
> Convert existing binding to support validation.
>
> This is a straightforward conversion with now new properties.
>
> Reviewed-by: Rob Herring <[email protected]>
> Signed-off-by: Javier Carrasco <[email protected]>

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter

2024-03-23 14:17:12

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH v3 2/5] dt-bindings: hwmon: ibmpowernv: convert to dtschema

On Fri, Mar 22, 2024 at 08:24:36PM +0100, Javier Carrasco wrote:
> Convert existing binding to support validation.
>
> The binding has been renamed to match its compatible strings, with no
> further additions.
>
> Reviewed-by: Conor Dooley <[email protected]>
> Signed-off-by: Javier Carrasco <[email protected]>

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter

2024-03-23 14:17:54

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH v3 3/5] dt-bindings: hwmon: pwm-fan: drop text file

On Fri, Mar 22, 2024 at 08:24:37PM +0100, Javier Carrasco wrote:
> This binding was converted to dtschema a year ago.
>
> Acked-by: Rob Herring <[email protected]>
> Signed-off-by: Javier Carrasco <[email protected]>

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter

2024-03-23 14:18:29

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH v3 4/5] dt-bindings: hwmon: stts751: convert to dtschema

On Fri, Mar 22, 2024 at 08:24:38PM +0100, Javier Carrasco wrote:
> Convert existing binding to support validation.
>
> This is a straightforward conversion with no new properties.
>
> Reviewed-by: Conor Dooley <[email protected]>
> Signed-off-by: Javier Carrasco <[email protected]>

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter

2024-03-23 14:19:02

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH v3 5/5] dt-bindings: hwmon: ibm,p8-occ-hwmon: move to trivial devices

On Fri, Mar 22, 2024 at 08:24:39PM +0100, Javier Carrasco wrote:
> This binding meets the requirements to be converted to dtschema
> via trivial-devices.yaml.
>
> Reviewed-by: Rob Herring <[email protected]>
> Signed-off-by: Javier Carrasco <[email protected]>

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter