lkml.org 
[lkml]   [2020]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v2 1/6] dt-bindings: pwm: add PWM_NOFLAGS definition
Date
"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 --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
\
 
 \ /
  Last update: 2020-04-05 21:24    [W:0.042 / U:4.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site