devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema
@ 2024-03-21 16:33 Javier Carrasco
  2024-03-21 16:33 ` [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert " Javier Carrasco
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Javier Carrasco @ 2024-03-21 16:33 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, peiyu li
  Cc: linux-hwmon, devicetree, linux-kernel, Javier Carrasco

This series converts the existing lm87.txt and max6650.txt bindings to
dtschema. Both are direct conversions with no additional properties.

There has been an attempt to convert the bindings of the lm87 before
[1], but the author (added to recipients) has confirmed that no further
versions will be submitted, and no acknowledgment is desired.

Link: https://lore.kernel.org/linux-hwmon/20231030125221.12974-1-579lpy@gmail.com [1]

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Changes in v2:
- max6650: add property constraints and commit message indentation.
- lm87: No changes, already applied to hwmon-next.
- Link to v1: https://lore.kernel.org/r/20240320-hwmon_yaml-v1-0-a349ca21ccab@gmail.com

---
Javier Carrasco (2):
      dt-bindings: hwmon: lm87: convert to dtschema
      dt-bindings: hwmon: max6650: convert to dtschema

 Documentation/devicetree/bindings/hwmon/lm87.txt   | 30 ----------
 .../devicetree/bindings/hwmon/max6650.txt          | 28 ---------
 .../devicetree/bindings/hwmon/maxim,max6650.yaml   | 70 ++++++++++++++++++++++
 .../devicetree/bindings/hwmon/ti,lm87.yaml         | 69 +++++++++++++++++++++
 4 files changed, 139 insertions(+), 58 deletions(-)
---
base-commit: a4145ce1e7bc247fd6f2846e8699473448717b37
change-id: 20240320-hwmon_yaml-4d738e3b2c82

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert to dtschema
  2024-03-21 16:33 [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema Javier Carrasco
@ 2024-03-21 16:33 ` Javier Carrasco
  2024-03-21 17:46   ` Krzysztof Kozlowski
  2024-03-21 16:33 ` [PATCH v2 2/2] dt-bindings: hwmon: max6650: " Javier Carrasco
  2024-03-21 16:48 ` [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 " Rob Herring
  2 siblings, 1 reply; 8+ messages in thread
From: Javier Carrasco @ 2024-03-21 16:33 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, peiyu li
  Cc: linux-hwmon, devicetree, linux-kernel, Javier Carrasco

Convert existing bindings to dtschema to support validation.

This is a straightforward conversion with no new properties.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 Documentation/devicetree/bindings/hwmon/lm87.txt   | 30 ----------
 .../devicetree/bindings/hwmon/ti,lm87.yaml         | 69 ++++++++++++++++++++++
 2 files changed, 69 insertions(+), 30 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/lm87.txt b/Documentation/devicetree/bindings/hwmon/lm87.txt
deleted file mode 100644
index 758ff398b67b..000000000000
--- a/Documentation/devicetree/bindings/hwmon/lm87.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-*LM87 hwmon sensor.
-
-Required properties:
-- compatible: Should be
-	"ti,lm87"
-
-- reg: I2C address
-
-optional properties:
-- has-temp3: This configures pins 18 and 19 to be used as a second
-             remote temperature sensing channel. By default the pins
-             are configured as voltage input pins in0 and in5.
-
-- has-in6: When set, pin 5 is configured to be used as voltage input
-           in6. Otherwise the pin is set as FAN1 input.
-
-- has-in7: When set, pin 6 is configured to be used as voltage input
-           in7. Otherwise the pin is set as FAN2 input.
-
-- vcc-supply: a Phandle for the regulator supplying power, can be
-              configured to measure 5.0V power supply. Default is 3.3V.
-
-Example:
-
-lm87@2e {
-	compatible = "ti,lm87";
-	reg = <0x2e>;
-	has-temp3;
-	vcc-supply = <&reg_5v0>;
-};
diff --git a/Documentation/devicetree/bindings/hwmon/ti,lm87.yaml b/Documentation/devicetree/bindings/hwmon/ti,lm87.yaml
new file mode 100644
index 000000000000..f553235a7321
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ti,lm87.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/ti,lm87.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments LM87 Hardware Monitor
+
+maintainers:
+  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+description: |
+  The LM87 is a serial interface system hardware monitor
+  with remote diode temperature sensing.
+
+  Datasheets:
+    https://www.ti.com/product/LM87
+
+properties:
+  compatible:
+    const: ti,lm87
+
+  reg:
+    maxItems: 1
+
+  has-temp3:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      This configures pins 18 and 19 to be used as a second
+      remote temperature sensing channel. By default the pins
+      are configured as voltage input pins in0 and in5.
+
+  has-in6:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      When set, pin 5 is configured to be used as voltage input
+      in6. Otherwise the pin is set as FAN1 input.
+
+  has-in7:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      When set, pin 6 is configured to be used as voltage input
+      in7. Otherwise the pin is set as FAN2 input.
+
+  vcc-supply:
+    description:
+      Regulator supplying power, can be configured to measure
+      5.0V power supply. Default is 3.3V.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        hwmon@2e {
+            compatible = "ti,lm87";
+            reg = <0x2e>;
+            has-temp3;
+            vcc-supply = <&reg_5v0>;
+        };
+    };

-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] dt-bindings: hwmon: max6650: convert to dtschema
  2024-03-21 16:33 [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema Javier Carrasco
  2024-03-21 16:33 ` [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert " Javier Carrasco
@ 2024-03-21 16:33 ` Javier Carrasco
  2024-03-21 16:50   ` Rob Herring
  2024-03-23 14:15   ` Guenter Roeck
  2024-03-21 16:48 ` [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 " Rob Herring
  2 siblings, 2 replies; 8+ messages in thread
From: Javier Carrasco @ 2024-03-21 16:33 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, peiyu li
  Cc: linux-hwmon, devicetree, linux-kernel, Javier Carrasco

Convert existing bindings to dtschema to support validation.

This is a straightforward conversion with no new properties.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 .../devicetree/bindings/hwmon/max6650.txt          | 28 ---------
 .../devicetree/bindings/hwmon/maxim,max6650.yaml   | 70 ++++++++++++++++++++++
 2 files changed, 70 insertions(+), 28 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/max6650.txt b/Documentation/devicetree/bindings/hwmon/max6650.txt
deleted file mode 100644
index f6bd87d8e284..000000000000
--- a/Documentation/devicetree/bindings/hwmon/max6650.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Bindings for MAX6651 and MAX6650 I2C fan controllers
-
-Reference:
-[1]	https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf
-
-Required properties:
-- compatible : One of "maxim,max6650" or "maxim,max6651"
-- reg        : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48.
-
-Optional properties, default is to retain the chip's current setting:
-- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or
-			12000000 uV.
-- maxim,fan-prescale  : Pre-scaling value, as per datasheet [1]. Lower values
-			allow more fine-grained control of slower fans.
-			Valid: 1, 2, 4, 8, 16.
-- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the
-			driver selects closed-loop mode and the requested speed.
-			This ensures the fan is already running before userspace
-			takes over.
-
-Example:
-	fan-max6650: max6650@1b {
-		reg = <0x1b>;
-		compatible = "maxim,max6650";
-		maxim,fan-microvolt = <12000000>;
-		maxim,fan-prescale = <4>;
-		maxim,fan-target-rpm = <1200>;
-	};
diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml
new file mode 100644
index 000000000000..2c26104a5e16
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/maxim,max6650.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX6650 and MAX6651 I2C Fan Controllers
+
+maintainers:
+  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+description: |
+  The MAX6650 and MAX6651 regulate and monitor the speed
+  of 5VDC/12VDC burshless fans with built-in tachometers.
+
+  Datasheets:
+    https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf
+
+properties:
+  compatible:
+    enum:
+      - maxim,max6650
+      - maxim,max6651
+
+  reg:
+    maxItems: 1
+
+  maxim,fan-microvolt:
+    description:
+      The supply voltage of the fan, either 5000000 uV or
+      12000000 uV.
+    enum: [5000000, 12000000]
+
+  maxim,fan-prescale:
+    description:
+      Pre-scaling value, as per datasheet. Lower values
+      allow more fine-grained control of slower fans.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [1, 2, 4, 8, 16]
+
+  maxim,fan-target-rpm:
+    description:
+      Initial requested fan rotation speed. If specified, the
+      driver selects closed-loop mode and the requested speed.
+      This ensures the fan is already running before userspace
+      takes over.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 30000
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        fan-controller@1b {
+            compatible = "maxim,max6650";
+            reg = <0x1b>;
+            maxim,fan-microvolt = <12000000>;
+            maxim,fan-prescale = <4>;
+            maxim,fan-target-rpm = <1200>;
+        };
+    };

-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema
  2024-03-21 16:33 [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema Javier Carrasco
  2024-03-21 16:33 ` [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert " Javier Carrasco
  2024-03-21 16:33 ` [PATCH v2 2/2] dt-bindings: hwmon: max6650: " Javier Carrasco
@ 2024-03-21 16:48 ` Rob Herring
  2 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2024-03-21 16:48 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Jean Delvare, Guenter Roeck, Krzysztof Kozlowski, Conor Dooley,
	peiyu li, linux-hwmon, devicetree, linux-kernel

On Thu, Mar 21, 2024 at 05:33:16PM +0100, Javier Carrasco wrote:
> This series converts the existing lm87.txt and max6650.txt bindings to
> dtschema. Both are direct conversions with no additional properties.
> 
> There has been an attempt to convert the bindings of the lm87 before
> [1], but the author (added to recipients) has confirmed that no further
> versions will be submitted, and no acknowledgment is desired.
> 
> Link: https://lore.kernel.org/linux-hwmon/20231030125221.12974-1-579lpy@gmail.com [1]
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
> Changes in v2:
> - max6650: add property constraints and commit message indentation.
> - lm87: No changes, already applied to hwmon-next.

Then you should not have sent it again. And you forgot Conor's 
Reviewed-by.

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: hwmon: max6650: convert to dtschema
  2024-03-21 16:33 ` [PATCH v2 2/2] dt-bindings: hwmon: max6650: " Javier Carrasco
@ 2024-03-21 16:50   ` Rob Herring
  2024-03-23 14:15   ` Guenter Roeck
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2024-03-21 16:50 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Jean Delvare, Guenter Roeck, Krzysztof Kozlowski, Conor Dooley,
	peiyu li, linux-hwmon, devicetree, linux-kernel

On Thu, Mar 21, 2024 at 05:33:18PM +0100, Javier Carrasco wrote:
> Convert existing bindings to dtschema to support validation.
> 
> This is a straightforward conversion with no new properties.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  .../devicetree/bindings/hwmon/max6650.txt          | 28 ---------
>  .../devicetree/bindings/hwmon/maxim,max6650.yaml   | 70 ++++++++++++++++++++++
>  2 files changed, 70 insertions(+), 28 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert to dtschema
  2024-03-21 16:33 ` [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert " Javier Carrasco
@ 2024-03-21 17:46   ` Krzysztof Kozlowski
  2024-03-21 17:47     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-21 17:46 UTC (permalink / raw)
  To: Javier Carrasco, Jean Delvare, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, peiyu li
  Cc: linux-hwmon, devicetree, linux-kernel

On 21/03/2024 17:33, Javier Carrasco wrote:
> Convert existing bindings to dtschema to support validation.
> 
> This is a straightforward conversion with no new properties.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---

Please keep original Co-developed-by with SoB.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert to dtschema
  2024-03-21 17:46   ` Krzysztof Kozlowski
@ 2024-03-21 17:47     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-21 17:47 UTC (permalink / raw)
  To: Javier Carrasco, Jean Delvare, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, peiyu li
  Cc: linux-hwmon, devicetree, linux-kernel

On 21/03/2024 18:46, Krzysztof Kozlowski wrote:
> On 21/03/2024 17:33, Javier Carrasco wrote:
>> Convert existing bindings to dtschema to support validation.
>>
>> This is a straightforward conversion with no new properties.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> ---
> 
> Please keep original Co-developed-by with SoB.

Ah, sorry, I missed remark in cover letter. Ignore my comment.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: hwmon: max6650: convert to dtschema
  2024-03-21 16:33 ` [PATCH v2 2/2] dt-bindings: hwmon: max6650: " Javier Carrasco
  2024-03-21 16:50   ` Rob Herring
@ 2024-03-23 14:15   ` Guenter Roeck
  1 sibling, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2024-03-23 14:15 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	peiyu li, linux-hwmon, devicetree, linux-kernel

On Thu, Mar 21, 2024 at 05:33:18PM +0100, Javier Carrasco wrote:
> Convert existing bindings to dtschema to support validation.
> 
> This is a straightforward conversion with no new properties.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied to hwmon-next.

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

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-23 14:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 16:33 [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 to dtschema Javier Carrasco
2024-03-21 16:33 ` [PATCH v2 1/2] dt-bindings: hwmon: lm87: convert " Javier Carrasco
2024-03-21 17:46   ` Krzysztof Kozlowski
2024-03-21 17:47     ` Krzysztof Kozlowski
2024-03-21 16:33 ` [PATCH v2 2/2] dt-bindings: hwmon: max6650: " Javier Carrasco
2024-03-21 16:50   ` Rob Herring
2024-03-23 14:15   ` Guenter Roeck
2024-03-21 16:48 ` [PATCH v2 0/2] dt-bindings: hwmon: convert lm87 and max6650 " Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).