[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1522321835-6460-8-git-send-email-claudiu.beznea@microchip.com>
Date: Thu, 29 Mar 2018 14:10:33 +0300
From: Claudiu Beznea <claudiu.beznea@...rochip.com>
To: <thierry.reding@...il.com>, <shc_work@...l.ru>,
<robh+dt@...nel.org>, <mark.rutland@....com>, <corbet@....net>,
<nicolas.ferre@...rochip.com>,
<alexandre.belloni@...e-electrons.com>
CC: <linux-pwm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH v4 7/9] pwm: add push-pull mode support
Add push-pull mode support. In push-pull mode the channels' outputs have
same polarities and the edges are complementary delayed for one period.
Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
drivers/pwm/core.c | 1 +
include/linux/pwm.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 59a9df9120de..5fde2e685ca7 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -348,6 +348,7 @@ const char *pwm_mode_desc(struct pwm_device *pwm, unsigned long mode)
"invalid",
"normal",
"complementary",
+ "push-pull",
};
if (!pwm_mode_valid(pwm, mode))
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index c4aa997489f3..9a99d5659331 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -29,11 +29,14 @@ enum pwm_polarity {
* PWM modes capabilities
* @PWMC_MODE_NORMAL_BIT: PWM has one output
* @PWMC_MODE_COMPLEMENTARY_BIT: PWM has 2 outputs with opposite polarities
+ * @PWMC_MODE_PUSH_PULL_BIT: PWM has 2 outputs with same polarities and the
+ * edges are complementary delayed for one period
* @PWMC_MODE_CNT: PWM modes count
*/
enum {
PWMC_MODE_NORMAL_BIT,
PWMC_MODE_COMPLEMENTARY_BIT,
+ PWMC_MODE_PUSH_PULL_BIT,
PWMC_MODE_CNT,
};
--
2.7.4
Powered by blists - more mailing lists