Skip to contentSkip to conversation

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

PATCH Superseded Jeremy Dean 2 participants 2 messages Oct 9 – Oct 12 1 message not in the archive

Subsystems (2)

v2 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 v2 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 v2:
- 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
#2 lore raw
Quoted 11 lines · Jeremy Dean

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.

Quoted 6 lines

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

As explained already - this is not correct. Read submitting patches - you need to use full name, not first given names.

Best regards,
Krzysztof