Skip to contentSkip to conversation

Add devicetree support for max6639

PATCH Superseded Naresh Solanki 5 participants 15 messages Nov 16, 2022 – Nov 29, 2022

Subsystems (3)

v6 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v6 cover Add devicetree support for max6639

These patches adds devicetree support for MAX6639.

Changes in V6:
- Remove unused header file
- minor cleanup
Changes in V5:
- Add pwms support
Changes V4:
- Fix dt error
- update comment
Changes V3:
- correct fan dt property name
- remove unrelevent changes
Changes V2:
- Fix dt schema error.
Changes:
- Add fan-common dt schema.
- add dt-binding support for max6639
- add max6639 specific property

Marcello Sylvester Bauer (1):
dt-bindings: hwmon: Add binding for max6639

Naresh Solanki (2):
dt-bindings: hwmon: fan: Add fan binding to schema
hwmon: (max6639) Change from pdata to dt configuration

 .../devicetree/bindings/hwmon/fan-common.yaml |  42 ++
 .../bindings/hwmon/maxim,max6639.yaml         |  93 ++++
 drivers/hwmon/Kconfig                         |   1 +
 drivers/hwmon/max6639.c                       | 460 +++++++++++++++---
 include/linux/platform_data/max6639.h         |  15 -
 5 files changed, 522 insertions(+), 89 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
 create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml
 delete mode 100644 include/linux/platform_data/max6639.h

base-commit: 27fea302952d8c90cafbdbee96bafeca03544401

Signature · 1 line
2.37.3
#1 lore raw

PATCH v6 1/3 dt-bindings: hwmon: fan: Add fan binding to schema

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

patternProperties:

    "^fan@[0-2]":
      type: object
      $ref: fan-common.yaml#
---
 .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +42 -0
new file mode 100644
index 000000000000..1954882eed77
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:
+      PWM provider.
+
+  label:
+    description:
+      Optional fan label
+
+  fan-supply:
+    description:
+      Power supply for fan.
+
+additionalProperties: true
+
+...
Signature · 1 line
2.37.3
maintainer
#2 lore raw

Re: [PATCH v6 1/3] dt-bindings: hwmon: fan: Add fan binding to schema

Quoted 53 lines · Naresh Solanki

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

patternProperties:

    "^fan@[0-2]":
      type: object
      $ref: fan-common.yaml#
---
 .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +29 -0
new file mode 100644
index 000000000000..1954882eed77
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +10 -0
+      PWM provider.
+
+  label:
+    description:
+      Optional fan label
+
+  fan-supply:
+    description:
+      Power supply for fan.
+

I still think that at least min-rpm should be added. It is just as common as max-rpm.

Guenter

Quoted 3 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +3 -0
+additionalProperties: true
+
+...
maintainer
#3 lore raw

Re: [PATCH v6 1/3] dt-bindings: hwmon: fan: Add fan binding to schema

Quoted 59 lines · Guenter Roeck
Quoted 58 lines · Naresh Solanki

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

patternProperties:

    "^fan@[0-2]":
      type: object
      $ref: fan-common.yaml#
---
 .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +34 -0
new file mode 100644
index 000000000000..1954882eed77
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:
+      PWM provider.
+
+  label:
+    description:
+      Optional fan label
Quoted 8 lines

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 39

Quoted 5 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +5 -0
+
+  fan-supply:
+    description:
+      Power supply for fan.
+

I still think that at least min-rpm should be added. It is just as common as max-rpm.

Or a table if the response is not linear like LEDs/backlights? Though if there's a tach, that wouldn't be necessary.

Rob

maintainer
#4 lore raw

Re: [PATCH v6 1/3] dt-bindings: hwmon: fan: Add fan binding to schema

In reply to Naresh Solanki
Quoted 53 lines · Naresh Solanki

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

patternProperties:

    "^fan@[0-2]":
      type: object
      $ref: fan-common.yaml#
---
 .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +29 -0
new file mode 100644
index 000000000000..1954882eed77
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +10 -0
+      PWM provider.
+
+  label:
+    description:
+      Optional fan label
+
+  fan-supply:
+    description:
+      Power supply for fan.
+

Another property which is definitely missing and needed will be DC vs. PWM control. That is currently pwm[1-*]_mode in sysfs attributes, but it is really a fan attribute.

Many fans are DC controlled, so this property is absolutely necessary.

Guenter

#5 lore raw

Re: [PATCH v6 1/3] dt-bindings: hwmon: fan: Add fan binding to schema

In reply to Naresh Solanki
Quoted 24 lines · Naresh Solanki

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

patternProperties:

    "^fan@[0-2]":
      type: object
      $ref: fan-common.yaml#
---
 .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +0 -0
new file mode 100644
index 000000000000..1954882eed77

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +7 -0
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties

If there is going to be resend - capitalize title, so:

Common Fan Properties

Quoted 13 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +13 -0
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 30

Quoted 10 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +10 -0
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:
+      PWM provider.

Isn't this object? If so, maybe:
type: object

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v6 1/3] dt-bindings: hwmon: fan: Add fan binding to schema

Hi Krzysztof,

Quoted 35 lines · Krzysztof Kozlowski
Quoted 24 lines · Naresh Solanki

Add common fan properties bindings to a schema.

Bindings for fan controllers can reference the common schema for the fan

child nodes:

   patternProperties:
     "^fan@[0-2]":
       type: object
       $ref: fan-common.yaml#
---
  .../devicetree/bindings/hwmon/fan-common.yaml | 42 +++++++++++++++++++
  1 file changed, 42 insertions(+)

create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml

Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +0 -0
new file mode 100644
index 000000000000..1954882eed77

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +7 -0
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common fan properties

If there is going to be resend - capitalize title, so:

Quoted 2 lines

Common Fan Properties

Sure

Quoted 18 lines
Quoted 18 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +18 -0
+
+maintainers:
+  - Naresh Solanki <[email protected]>
+
+properties:
+  max-rpm:
+    description:
+      Max RPM supported by fan.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pulses-per-revolution:
+    description:
+      The number of pulse from fan sensor per revolution.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  target-rpm:
+    description:
+      Target RPM the fan should be configured during driver probe.
Quoted 8 lines

Documentation/devicetree/bindings/hwmon/fan-common.yaml line 30

Quoted 5 lines
Documentation/devicetree/bindings/hwmon/fan-common.yaml new file +5 -0
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  pwms:
+    description:
+      PWM provider.

Isn't this object? If so, maybe:
type: object

With make dt_binding_check, I'm getting error for this.
Looking at other available examples in documentation, type object is not used.

Example:
pwms:
maxItems: 1

One pwm per fan.

Quoted 6 lines

Best regards,
Krzysztof

Regards,
Naresh

#7 lore raw

PATCH v6 2/3 dt-bindings: hwmon: Add binding for max6639

In reply to Naresh Solanki

From: Marcello Sylvester Bauer <[email protected]>

Add Devicetree binding documentation for Maxim MAX6639 temperature monitor with PWM fan-speed controller.

---
 .../bindings/hwmon/maxim,max6639.yaml         | 93 +++++++++++++++++++
 1 file changed, 93 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml
Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml new file +93 -0
new file mode 100644
index 000000000000..da040b11d2ab
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/maxim,max6639.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim max6639
+
+maintainers:
+  - Roland Stigge <[email protected]>
+
+description: |
+  The MAX6639 is a 2-channel temperature monitor with dual, automatic, PWM
+  fan-speed controller.  It monitors its own temperature and one external
+  diode-connected transistor or the temperatures of two external diode-connected
+  transistors, typically available in CPUs, FPGAs, or GPUs.
+
+  Datasheets:
+    https://datasheets.maximintegrated.com/en/ds/MAX6639-MAX6639F.pdf
+
+properties:
+  compatible:
+    enum:
+      - maxim,max6639
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  '#pwm-cells':
+    const: 3
+
+required:
+  - compatible
+  - reg
+
+patternProperties:
+  "^fan@[0-1]$":
+    type: object
+    description: |
+      Represents the two fans and their specific configuration.
+
+    $ref: fan-common.yaml#
+
+    properties:
+      reg:
+        description: |
+          The fan number.
+        items:
+          minimum: 0
+          maximum: 1
+
+    required:
+      - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        fan1: fan-controller@10 {
+            compatible = "maxim,max6639";
+            reg = <0x10>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            #pwm-cells = <3>;
+
+            fan@0 {
+                reg = <0x0>;
+                pulses-per-revolution = <2>;
+                max-rpm = <4000>;
+                target-rpm = <1000>;
+                pwms = <&fan1 0 25000 0>;
+            };
+
+            fan@1 {
+                reg = <0x1>;
+                pulses-per-revolution = <2>;
+                max-rpm = <8000>;
+                pwms = <&fan1 1 25000 0>;
+            };
+            };
+    };
+...
Signature · 1 line
2.37.3
#8 lore raw

PATCH v6 3/3 hwmon: (max6639) Change from pdata to dt configuration

In reply to Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

---
 drivers/hwmon/Kconfig                 |   1 +
 drivers/hwmon/max6639.c               | 460 +++++++++++++++++++++-----
 include/linux/platform_data/max6639.h |  15 -
 3 files changed, 387 insertions(+), 89 deletions(-)
 delete mode 100644 include/linux/platform_data/max6639.h
drivers/hwmon/Kconfig +1 -0
index 3176c33af6c6..56d9004b7a38 100644
@@ -1115,6 +1115,7 @@ config SENSORS_MAX6621
 config SENSORS_MAX6639
 	tristate "Maxim MAX6639 sensor chip"
 	depends on I2C
+	depends on PWM
 	help
 	  If you say yes here you get support for the MAX6639
 	  sensor chips.
drivers/hwmon/max6639.c +386 -74

625 lines not on this page · raw message

include/linux/platform_data/max6639.h deleted +0 -15
deleted file mode 100644
index 65bfdb4fdc15..000000000000
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_MAX6639_H
-#define _LINUX_MAX6639_H
-
-#include <linux/types.h>
-
-/* platform data for the MAX6639 temperature sensor and fan control */
-
-struct max6639_platform_data {
-	bool pwm_polarity;	/* Polarity low (0) or high (1, default) */
-	int ppr;		/* Pulses per rotation 1..4 (default == 2) */
-	int rpm_range;		/* 2000, 4000 (default), 8000 or 16000 */
-};
-
-#endif /* _LINUX_MAX6639_H */
Signature · 1 line
2.37.3
#9 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

Hello,

Quoted 10 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#10 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

Quoted 11 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

Quoted 8 lines
Quoted 2 lines

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Not sure what I missed but did following changes:
Removed unused header max6639.h
Used dev_err_probe instead,
Removed of_pwm_n_cells,
if condition for freq_table
removed pwm_get_state & instead use pwm->state
division/multiplication optimizations,
indentation of freq_table,

Quoted 4 lines

Best regards
Uwe

Thanks,
Naresh

#11 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

Quoted 22 lines · Naresh Solanki
Quoted 11 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

Quoted 8 lines
Quoted 2 lines

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Quoted 8 lines

Not sure what I missed but did following changes:
Removed unused header max6639.h
Used dev_err_probe instead,
Removed of_pwm_n_cells,
if condition for freq_table
removed pwm_get_state & instead use pwm->state
division/multiplication optimizations,
indentation of freq_table,

In the cover letter you just wrote:

| Changes in V6:
| - Remove unused header file
| - minor cleanup

which is too short in my eyes. If you wrote instead:

Address review feedback by Uwe Kleine-König in patch #3, patches #1 and #2 unchanged.

This would be much more helpful as people that were already happy with v5 wouldn't need to look at the first two patches and I would know that you addressed my feedback and would have looked in more detail.

What I miss is the most critical part of my feedback, i.e.:

| My overall impression is that this patch mixes too much things. IMHO it
| should be split in (at least)
| 
|  - Add dt support
|  - Drop platform support
|  - Add PWM provider support
|  - Make use of the PWM API
|
| maybe also add the 2nd PWM in a separate step.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#12 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

Hi Uwe,

Quoted 38 lines · Uwe Kleine-König
Quoted 22 lines · Naresh Solanki
Quoted 11 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

Quoted 8 lines
Quoted 2 lines

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Quoted 8 lines

Not sure what I missed but did following changes:
Removed unused header max6639.h
Used dev_err_probe instead,
Removed of_pwm_n_cells,
if condition for freq_table
removed pwm_get_state & instead use pwm->state
division/multiplication optimizations,
indentation of freq_table,

In the cover letter you just wrote:

| Changes in V6:
| - Remove unused header file
| - minor cleanup
Quoted 8 lines

which is too short in my eyes. If you wrote instead:

Address review feedback by Uwe Kleine-König in patch #3, patches #1 and #2 unchanged.

This would be much more helpful as people that were already happy with v5 wouldn't need to look at the first two patches and I would know that you addressed my feedback and would have looked in more detail.

Sure will keep it this way next time.

Quoted 11 lines

What I miss is the most critical part of my feedback, i.e.:

| My overall impression is that this patch mixes too much things. IMHO it
| should be split in (at least)
|
|  - Add dt support
|  - Drop platform support
|  - Add PWM provider support
|  - Make use of the PWM API
|
| maybe also add the 2nd PWM in a separate step.

Sure can do that.

Quoted 4 lines

Best regards
Uwe

Thanks,
Naresh

maintainer
#13 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

In reply to Uwe Kleine-König
Quoted 48 lines · Uwe Kleine-König
Quoted 22 lines · Naresh Solanki
Quoted 11 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

Quoted 8 lines
Quoted 2 lines

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Quoted 8 lines

Not sure what I missed but did following changes:
Removed unused header max6639.h
Used dev_err_probe instead,
Removed of_pwm_n_cells,
if condition for freq_table
removed pwm_get_state & instead use pwm->state
division/multiplication optimizations,
indentation of freq_table,

In the cover letter you just wrote:

| Changes in V6:
| - Remove unused header file
| - minor cleanup

which is too short in my eyes. If you wrote instead:

Address review feedback by Uwe Kleine-König in patch #3, patches #1 and #2 unchanged.

This would be much more helpful as people that were already happy with v5 wouldn't need to look at the first two patches and I would know that you addressed my feedback and would have looked in more detail.

What I miss is the most critical part of my feedback, i.e.:

Quoted 9 lines
| My overall impression is that this patch mixes too much things. IMHO it
| should be split in (at least)
| 
|  - Add dt support
|  - Drop platform support
|  - Add PWM provider support
|  - Make use of the PWM API
|
| maybe also add the 2nd PWM in a separate step.

Those will definitely need to be separate patches. I am far from convinced that all fan controllers in the hwmon subsystem should implement pwm providers just to match devicetree requirements. That adds zero value in 99% of all use cases. Actually, I don't know of any use cases where it would add value or even make sense.

Guenter

Quoted 7 lines

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer
#14 lore raw

Re: [PATCH v6 3/3] hwmon: (max6639) Change from pdata to dt configuration

Quoted 59 lines · Guenter Roeck
Quoted 48 lines · Uwe Kleine-König
Quoted 22 lines · Naresh Solanki
Quoted 11 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Naresh Solanki

max6639_platform_data is not used by any in-kernel driver and does not address the MAX6639 fans separately.
Move to device tree configuration with explicit properties to configure each fan.

Non-DT platform can still use this module with its default configuration.

Quoted 8 lines
Quoted 2 lines

What changed here since v5? Please either add a changelog below the tripple-dash for a new revision, or make sure that all relevant people get the cover letter.

It seems you didn't address my comments for v5 :-\

Quoted 8 lines

Not sure what I missed but did following changes:
Removed unused header max6639.h
Used dev_err_probe instead,
Removed of_pwm_n_cells,
if condition for freq_table
removed pwm_get_state & instead use pwm->state
division/multiplication optimizations,
indentation of freq_table,

In the cover letter you just wrote:

| Changes in V6:
| - Remove unused header file
| - minor cleanup

which is too short in my eyes. If you wrote instead:

Address review feedback by Uwe Kleine-König in patch #3, patches #1 and #2 unchanged.

This would be much more helpful as people that were already happy with v5 wouldn't need to look at the first two patches and I would know that you addressed my feedback and would have looked in more detail.

What I miss is the most critical part of my feedback, i.e.:

Quoted 9 lines
| My overall impression is that this patch mixes too much things. IMHO it
| should be split in (at least)
| 
|  - Add dt support
|  - Drop platform support
|  - Add PWM provider support
|  - Make use of the PWM API
|
| maybe also add the 2nd PWM in a separate step.
Quoted 5 lines

Those will definitely need to be separate patches. I am far from convinced that all fan controllers in the hwmon subsystem should implement pwm providers just to match devicetree requirements. That adds zero value in 99% of all use cases. Actually, I don't know of any use cases where it would add value or even make sense.

There's no requirement that using a binding means using corresponding Linux subsystem. Convenient usually, but not required.

Rob