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

From: Oleksandr Suvorov
Date: Sun Apr 05 2020 - 15:23:11 EST


"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@xxxxxxxxxxx>
---

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 --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
--
2.24.1