[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519196339-9377-2-git-send-email-rrajk@nvidia.com>
Date: Wed, 21 Feb 2018 12:28:50 +0530
From: Rajkumar Rampelli <rrajk@...dia.com>
To: <robh+dt@...nel.org>, <mark.rutland@....com>,
<thierry.reding@...il.com>, <jonathanh@...dia.com>,
<jdelvare@...e.com>, <linux@...ck-us.net>, <corbet@....net>,
<catalin.marinas@....com>, <will.deacon@....com>,
<kstewart@...uxfoundation.org>, <gregkh@...uxfoundation.org>,
<pombredanne@...b.com>, <mmaddireddy@...dia.com>,
<mperttunen@...dia.com>, <arnd@...db.de>,
<gregory.clement@...e-electrons.com>, <timur@...eaurora.org>,
<andy.gross@...aro.org>, <xuwei5@...ilicon.com>,
<elder@...aro.org>, <heiko@...ech.de>, <krzk@...nel.org>,
<ard.biesheuvel@...aro.org>
CC: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-pwm@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-hwmon@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <ldewangan@...dia.com>,
<rrajk@...dia.com>
Subject: [PATCH 01/10] pwm: core: Add support for PWM HW driver with pwm capture only
Add support for pwm HW driver which has only capture functionality.
This helps to implement the PWM based Tachometer driver which reads
the PWM output signals from electronic fans.
PWM Tachometer captures the period and duty cycle of the PWM signal
Signed-off-by: Rajkumar Rampelli <rrajk@...dia.com>
---
drivers/pwm/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 1581f6a..87d14c9 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -246,6 +246,10 @@ static bool pwm_ops_check(const struct pwm_ops *ops)
if (ops->apply)
return true;
+ /* driver supports capture operation */
+ if (ops->capture)
+ return true;
+
return false;
}
--
2.1.4
Powered by blists - more mailing lists