Skip to contentSkip to conversation

dt-bindings: leds: Convert PCA9532 to dtschema

PATCH Applied Wadim Egorov 4 participants 5 messages Apr 12, 2023 – Apr 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: leds: Convert PCA9532 to dtschema

Convert the PCA9532 LED Dimmer to dtschema.
While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs.

---
v3:
- Add gpio-controller & gpio-cells property, fixes

    arch/arm/boot/dts/lpc3250-ea3250.dtb: pca9532@60: '#gpio-cells', 'gpio-controller'
    do not match any of the regexes: '^led-[0-9a-z]+$', 'pinctrl-[0-9]+'

v2:
- Rename yaml file to match compatibles, nxp,pca953x.yaml
- Remove Jacek Anaszewski from maintainers list
- Remove color labels in example
- Restore labels/default-states from original example
- Drop reg description
- Add unevaluatedProperties to patternProperties scope
- Update description of type property & set default to 0
- Fix indentation in example

---
 .../devicetree/bindings/leds/leds-pca9532.txt | 49 ----------
 .../devicetree/bindings/leds/nxp,pca953x.yaml | 90 +++++++++++++++++++
 2 files changed, 90 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/leds-pca9532.txt
 create mode 100644 Documentation/devicetree/bindings/leds/nxp,pca953x.yaml
Documentation/devicetree/bindings/leds/leds-pca9532.txt deleted +0 -49
deleted file mode 100644
index f769c52e3643..000000000000
@@ -1,49 +0,0 @@
-*NXP - pca9532 PWM LED Driver
-
-The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
-The PWM support 256 steps.
-
-Required properties:
-	- compatible:
-		"nxp,pca9530"
-		"nxp,pca9531"
-		"nxp,pca9532"
-		"nxp,pca9533"
-	- reg -  I2C slave address
-
-Each led is represented as a sub-node of the nxp,pca9530.
-
-Optional sub-node properties:
-	- label: see Documentation/devicetree/bindings/leds/common.txt
-	- type: Output configuration, see dt-bindings/leds/leds-pca9532.h (default NONE)
-	- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
-	- default-state: see Documentation/devicetree/bindings/leds/common.txt
-	  This property is only valid for sub-nodes of type <PCA9532_TYPE_LED>.
-
-Example:
-  #include <dt-bindings/leds/leds-pca9532.h>
-
-  leds: pca9530@60 {
-    compatible = "nxp,pca9530";
-    reg = <0x60>;
-
-    red-power {
-      label = "pca:red:power";
-      type = <PCA9532_TYPE_LED>;
-    };
-    green-power {
-      label = "pca:green:power";
-      type = <PCA9532_TYPE_LED>;
-    };
-    kernel-booting {
-      type = <PCA9532_TYPE_LED>;
-      default-state = "on";
-    };
-    sys-stat {
-      type = <PCA9532_TYPE_LED>;
-      default-state = "keep"; // don't touch, was set by U-Boot
-    };
-  };
-
-For more product information please see the link below:
-http://nxp.com/documents/data_sheet/PCA9532.pdf
Documentation/devicetree/bindings/leds/nxp,pca953x.yaml new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH v3 1/1 dt-bindings: leds: Convert PCA9532 to dtschema

Convert the PCA9532 LED Dimmer to dtschema.
While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs.

---
v3:
- Add gpio-controller & gpio-cells property, fixes

    arch/arm/boot/dts/lpc3250-ea3250.dtb: pca9532@60: '#gpio-cells', 'gpio-controller'
    do not match any of the regexes: '^led-[0-9a-z]+$', 'pinctrl-[0-9]+'

v2:
- Rename yaml file to match compatibles, nxp,pca953x.yaml
- Remove Jacek Anaszewski from maintainers list
- Remove color labels in example
- Restore labels/default-states from original example
- Drop reg description
- Add unevaluatedProperties to patternProperties scope
- Update description of type property & set default to 0
- Fix indentation in example

---
 .../devicetree/bindings/leds/leds-pca9532.txt | 49 ----------
 .../devicetree/bindings/leds/nxp,pca953x.yaml | 90 +++++++++++++++++++
 2 files changed, 90 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/leds-pca9532.txt
 create mode 100644 Documentation/devicetree/bindings/leds/nxp,pca953x.yaml
Documentation/devicetree/bindings/leds/leds-pca9532.txt deleted +0 -49
deleted file mode 100644
index f769c52e3643..000000000000
@@ -1,49 +0,0 @@
-*NXP - pca9532 PWM LED Driver
-
-The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
-The PWM support 256 steps.
-
-Required properties:
-	- compatible:
-		"nxp,pca9530"
-		"nxp,pca9531"
-		"nxp,pca9532"
-		"nxp,pca9533"
-	- reg -  I2C slave address
-
-Each led is represented as a sub-node of the nxp,pca9530.
-
-Optional sub-node properties:
-	- label: see Documentation/devicetree/bindings/leds/common.txt
-	- type: Output configuration, see dt-bindings/leds/leds-pca9532.h (default NONE)
-	- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
-	- default-state: see Documentation/devicetree/bindings/leds/common.txt
-	  This property is only valid for sub-nodes of type <PCA9532_TYPE_LED>.
-
-Example:
-  #include <dt-bindings/leds/leds-pca9532.h>
-
-  leds: pca9530@60 {
-    compatible = "nxp,pca9530";
-    reg = <0x60>;
-
-    red-power {
-      label = "pca:red:power";
-      type = <PCA9532_TYPE_LED>;
-    };
-    green-power {
-      label = "pca:green:power";
-      type = <PCA9532_TYPE_LED>;
-    };
-    kernel-booting {
-      type = <PCA9532_TYPE_LED>;
-      default-state = "on";
-    };
-    sys-stat {
-      type = <PCA9532_TYPE_LED>;
-      default-state = "keep"; // don't touch, was set by U-Boot
-    };
-  };
-
-For more product information please see the link below:
-http://nxp.com/documents/data_sheet/PCA9532.pdf
Documentation/devicetree/bindings/leds/nxp,pca953x.yaml new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.25.1
Acked-by on v3 1/1
#3 lore raw
In reply to Wadim Egorov
Quoted 6 lines · Wadim Egorov

Convert the PCA9532 LED Dimmer to dtschema.
While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs.

BR,
Pavel

Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
maintainer Applied
#4 lore raw
In reply to Wadim Egorov
Quoted 21 lines · Wadim Egorov

Convert the PCA9532 LED Dimmer to dtschema.
While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs.

---
v3:
- Add gpio-controller & gpio-cells property, fixes

    arch/arm/boot/dts/lpc3250-ea3250.dtb: pca9532@60: '#gpio-cells', 'gpio-controller'
    do not match any of the regexes: '^led-[0-9a-z]+$', 'pinctrl-[0-9]+'

v2:
- Rename yaml file to match compatibles, nxp,pca953x.yaml
- Remove Jacek Anaszewski from maintainers list
- Remove color labels in example
- Restore labels/default-states from original example
- Drop reg description
- Add unevaluatedProperties to patternProperties scope
- Update description of type property & set default to 0
- Fix indentation in example

Quoted 6 lines
---
 .../devicetree/bindings/leds/leds-pca9532.txt | 49 ----------
 .../devicetree/bindings/leds/nxp,pca953x.yaml | 90 +++++++++++++++++++
 2 files changed, 90 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/leds-pca9532.txt
 create mode 100644 Documentation/devicetree/bindings/leds/nxp,pca953x.yaml

Applied, thanks

Signature · 1 line
Lee Jones [李琼斯]