Skip to contentSkip to conversation

dt-bindings: pwm: Convert NXP PCA9685 PWM controller to DT schema

PATCH Superseded Jeremy Dean Clifton 3 participants 5 messages Oct 12 – Oct 21 1 message not in the archive

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v3 1/1 dt-bindings: pwm: Convert NXP PCA9685 PWM controller to DT schema

Convert the NXP PCA9685 PWM controller binding to DT schema format.

Changes from the text binding:

Document the 'reg' property and make it required. It was missing from the text binding, although the example used it and the device cannot work without the I2C address.

Rename the example node to the generic 'pwm', as required by pwm.yaml.

Describe both cells of the PWM specifier, and state that 'invert' and 'open-drain' apply to all outputs, as per the datasheet (INVRT and OUTDRV bits in MODE2).

Assisted-by LLM

---
Changes in v3:
- Full name in From, Signed-off-by and maintainers. (Jeremy Dean Clifton)
v2:
https://lore.kernel.org/all/[email protected]/
though the storage width was widened.
- Use the same name in 'maintainers' as in the Signed-off-by.

v1:
https://lore.kernel.org/all/[email protected]/

The schema and commit message were drafted with AI assistant. I verified each property against the driver source, the PCA9685 datasheet and the binding. Passes make dt_binding_check.

 .../bindings/pwm/nxp,pca9685-pwm.txt          | 27 --------
 .../bindings/pwm/nxp,pca9685-pwm.yaml         | 62 +++++++++++++++++++
 2 files changed, 62 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml
Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt deleted +0 -27
deleted file mode 100644
index f21b55c95738..000000000000
@@ -1,27 +0,0 @@
-NXP PCA9685 16-channel 12-bit PWM LED controller
-================================================
-
-Required properties:
-  - compatible: "nxp,pca9685-pwm"
-  - #pwm-cells: Should be 2. See pwm.yaml in this directory for a description of
-    the cells format.
-    The index 16 is the ALLCALL channel, that sets all PWM channels at the same
-    time.
-
-Optional properties:
-  - invert (bool): boolean to enable inverted logic
-  - open-drain (bool): boolean to configure outputs with open-drain structure;
-		       if omitted use totem-pole structure
-
-Example:
-
-For LEDs that are directly connected to the PCA, the following setting is
-applicable:
-
-pca: pca@41 {
-	compatible = "nxp,pca9685-pwm";
-	#pwm-cells = <2>;
-	reg = <0x41>;
-	invert;
-	open-drain;
-};
Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml new file +62 -0

62 lines not on this page · raw message

base-commit: aac26bee2287c88af5be5a5ff96d783b19a28790

Signature · 1 line
2.43.0
maintainer Reviewed-by on v3 1/1
#2 lore raw
Quoted 33 lines · Jeremy Dean Clifton

Convert the NXP PCA9685 PWM controller binding to DT schema format.

Changes from the text binding:

Document the 'reg' property and make it required. It was missing from the text binding, although the example used it and the device cannot work without the I2C address.

Rename the example node to the generic 'pwm', as required by pwm.yaml.

Describe both cells of the PWM specifier, and state that 'invert' and 'open-drain' apply to all outputs, as per the datasheet (INVRT and OUTDRV bits in MODE2).

Assisted-by LLM

---
Changes in v3:
- Full name in From, Signed-off-by and maintainers. (Jeremy Dean Clifton)
v2:
https://lore.kernel.org/all/[email protected]/
though the storage width was widened.
- Use the same name in 'maintainers' as in the Signed-off-by.

v1:
https://lore.kernel.org/all/[email protected]/

The schema and commit message were drafted with AI assistant. I verified each property against the driver source, the PCA9685 datasheet and the binding. Passes make dt_binding_check.

Quoted 6 lines
 .../bindings/pwm/nxp,pca9685-pwm.txt          | 27 --------
 .../bindings/pwm/nxp,pca9685-pwm.yaml         | 62 +++++++++++++++++++
 2 files changed, 62 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml
#3 lore raw
In reply to Jeremy Dean Clifton

Hello Jeremy,

Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml line 10

Quoted 2 lines · Jeremy Dean Clifton
Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml new file +2 -0
+maintainers:
+  - Jeremy Dean Clifton <[email protected]>

What kind of commitment do you plan for this maintainer role? Do you have the hardware?

Best regards
Uwe

#4 lore raw
Quoted 9 lines · Uwe Kleine-König

Hello Jeremy,

Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml line 10

Quoted 2 lines · Jeremy Dean Clifton
Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml new file +2 -0
+maintainers:
+  - Jeremy Dean Clifton <[email protected]>

What kind of commitment do you plan for this maintainer role? Do you have the hardware?

I don't have the hardware, but I'm willing to get it and test on it if it comes to that. I'm glad to answer questions about the binding and to review future changes to it, also.

If you'd rather have someone closer to the driver listed as maintainer instead, that's fine with me too. I'm happy with either possibility.

Jeremy

Quoted 2 lines

Best regards
Uwe

#5 lore raw

Hello,

Quoted 8 lines · Jeremy Clifton
Quoted 6 lines · Uwe Kleine-König

Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml line 10

Quoted 2 lines · Jeremy Dean Clifton
Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml new file +2 -0
+maintainers:
+  - Jeremy Dean Clifton <[email protected]>

What kind of commitment do you plan for this maintainer role? Do you have the hardware?

Quoted 6 lines

I don't have the hardware, but I'm willing to get it and test on it if it comes to that. I'm glad to answer questions about the binding and to review future changes to it, also.

If you'd rather have someone closer to the driver listed as maintainer instead, that's fine with me too. I'm happy with either possibility.

I want that role combinded with the driver maintenance, so for now let's put me. If you want to take a responsibility here, please start working on it. With a track record you can take maintainership at a later point in time.

Best regards
Uwe