]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pwm: Add support for configuring the PWM polarity
authorPhilip, Avinash <avinashphilip@ti.com>
Tue, 24 Jul 2012 14:05:32 +0000 (19:35 +0530)
committerThierry Reding <thierry.reding@avionic-design.de>
Mon, 20 Aug 2012 10:00:17 +0000 (12:00 +0200)
commit5424a12630d935d3b6d2924bd16493d571bc7937
treef5c8467076871c99abcf98c37f75e9fdb5c644c6
parentb817bf5c72774556345a9043c6b0c497cdcb7295
pwm: Add support for configuring the PWM polarity

Some hardware supports inverting the polarity of the PWM signal. This
commit adds support to the PWM framework to allow users of the PWM API
to configure the polarity. Note that in order to reduce complexity,
changing the polarity of a PWM signal is only allowed while the PWM is
disabled.

A practical example where this can prove useful is to simulate inversion
of the duty cycle. While inversion of polarity and duty cycle are not
exactly the same, the differences for most use-cases are negligible.

Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/core.c
include/linux/pwm.h