diff mbox series

[RFC,v2,1/6] dt-bindings: pwm: add PWM_NOFLAGS definition

Message ID 20200405192246.3741784-2-oleksandr.suvorov@toradex.com
State New
Headers show
Series [RFC,v2,1/6] dt-bindings: pwm: add PWM_NOFLAGS definition | expand

Commit Message

Oleksandr Suvorov April 5, 2020, 7:22 p.m. UTC
"pwms" property has the optional 3rd cell for modification flags,
i.e. the flag for inverted polarity. Multiple pwms instances in child
nodes all have to have or haven't this flags property. Now the value
"no flags" codes with the raw constant "0".

Define the PWM_NOFLAGS to use instead of the raw "0" value.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
---

Changes in v2:
- Rename PWM_POLARITY_NORMAL to PWM_NOFLAGS to avoid possible
  conflict with enum pwm_polarity in <linux/pwm.h>. Also, this name
  reflects the sense of this value more precisely.

 include/dt-bindings/pwm/pwm.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
index ab9a077e3c7d..f4cc763e159a 100644
--- a/include/dt-bindings/pwm/pwm.h
+++ b/include/dt-bindings/pwm/pwm.h
@@ -10,6 +10,7 @@ 
 #ifndef _DT_BINDINGS_PWM_PWM_H
 #define _DT_BINDINGS_PWM_PWM_H
 
+#define PWM_NOFLAGS				0
 #define PWM_POLARITY_INVERTED			(1 << 0)
 
 #endif