]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 20 Sep 2016 14:40:56 +0000 (17:40 +0300)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 18 Jan 2017 23:38:16 +0000 (00:38 +0100)
commit53d6dd1302827d711f9507de20d338938a4c57ae
tree9c29def1d3a26a2d1ddb5b4b77f30221ff5187f0
parent890fcdd64047a0c9120b237799b69c2be8831d35
pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO

The PCA9685 controller has full on/off bit for each PWM channel. Setting
this bit bypasses the PWM control and the line works just as it would be a
GPIO. Furthermore in Intel Galileo it is actually used as GPIO output for
discreet muxes on the board.

This patch adds GPIO output only support for the driver so that we can
control the muxes on Galileo using standard GPIO interfaces available in
the kernel. GPIO and PWM functionality is exclusive so only one can be
active at a time on a single PWM channel.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-pca9685.c