Thread (30 messages) 30 messages, 6 authors, 2018-03-08
STALE3007d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 01/10] pwm: core: Add support for PWM HW driver with pwm capture only

From: Rajkumar Rampelli <hidden>
Date: 2018-02-21 06:58:50
Also in: linux-devicetree, linux-hwmon, linux-pwm, linux-tegra, lkml
Subsystem: pwm subsystem, the rest · Maintainers: Uwe Kleine-König, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help