Skip to contentSkip to conversation

dt: bindings: pca9532: add description of pwm and psc properties

PATCH New Markus Moll 2 participants 3 messages Sep 16, 2020 – Sep 22, 2020 1 message not in the archive

Subsystems (2)
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 2/2 dt: bindings: pca9532: add description of pwm and psc properties

These new properties allow users to configure the PWM when the device is probed. This is useful for e.g. uninterrupted blinking during boot.

---

Resending this patch as it seems the first attempt wasn't successful. Apologies if you received this patch twice.

 .../devicetree/bindings/leds/leds-pca9532.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/leds/leds-pca9532.txt +10 -0
index f769c52e364..3aa05eca9df 100644
@@ -11,6 +11,14 @@ Required properties:
 "nxp,pca9533"
 - reg - I2C slave address
 
+Optional properties:
+ - nxp,pwm: array of two 8-bit values specifying the blink duty cycle
+ fractions of each pwm (default )
+ The duty cycle is pwm/256.
+ - nxp,psc: array of two 8-bit values specifying the blink period of
+ each pwm (default )
+ The period is (psc+1)/152 seconds.
+
 Each led is represented as a sub-node of the nxp,pca9530.
 
 Optional sub-node properties:
@@ -26,6 +34,8 @@ Example:
 leds: pca9530@60 {
 compatible = "nxp,pca9530";
 reg = ;
+ nxp,pwm = /bits/ 8 ; // 50% duty cycle
+ nxp,psc = /bits/ 8 ; // 1Hz and 4Hz, respectively
 
 red-power {
 label = "pca:red:power";
Signature · 1 line
2.25.1
#2 lore raw
In reply to a message not in the archive
Quoted 24 lines · Markus Moll

These new properties allow users to configure the PWM when the device is probed. This is useful for e.g. uninterrupted blinking during boot.

---
.../devicetree/bindings/leds/leds-pca9532.txt | 10 ++++++++++

1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/leds/leds-pca9532.txt +0 -0
index f769c52e364..3aa05eca9df 100644
@@ -11,6 +11,14 @@ Required properties:

"nxp,pca9533"
- reg - I2C slave address

Documentation/devicetree/bindings/leds/leds-pca9532.txt +8 -0
+Optional properties:
+ - nxp,pwm: array of two 8-bit values specifying the blink duty cycle
+ fractions of each pwm (default <0 0>)
+ The duty cycle is pwm/256.
+ - nxp,psc: array of two 8-bit values specifying the blink period of
+ each pwm (default <0 0>)
+ The period is (psc+1)/152 seconds.
+
Quoted 1 line

Each led is represented as a sub-node of the nxp,pca9530.

This will need ACK from dt people.

Also patch came whitespace-damaged.

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
Quoted 3 lines · Pavel Machek

This will need ACK from dt people.

Also patch came whitespace-damaged.

Sorry about that, I'll send a new patch and cc it appropriately.

Regards
Markus