Commit 99b82abb authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Thierry Reding

pwm: Add Renesas TPU PWM driver

The Timer Pulse Unit (TPU) is a 4-channels 16-bit timer used to generate
waveforms. This driver exposes PWM functions through the PWM API for
other drivers to use.

The code is loosely based on the leds-renesas-tpu driver by Magnus Damm
and the TPU PWM driver shipped in the Armadillo EVA 800 kernel sources.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Tested-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 76abbdde
......@@ -128,6 +128,16 @@ config PWM_PXA
To compile this driver as a module, choose M here: the module
will be called pwm-pxa.
config PWM_RENESAS_TPU
tristate "Renesas TPU PWM support"
depends on ARCH_SHMOBILE
help
This driver exposes the Timer Pulse Unit (TPU) PWM controller found
in Renesas chips through the PWM API.
To compile this driver as a module, choose M here: the module
will be called pwm-renesas-tpu.
config PWM_SAMSUNG
tristate "Samsung PWM support"
depends on PLAT_SAMSUNG
......
......@@ -10,6 +10,7 @@ obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o
obj-$(CONFIG_PWM_PUV3) += pwm-puv3.o
obj-$(CONFIG_PWM_PXA) += pwm-pxa.o
obj-$(CONFIG_PWM_RENESAS_TPU) += pwm-renesas-tpu.o
obj-$(CONFIG_PWM_SAMSUNG) += pwm-samsung.o
obj-$(CONFIG_PWM_SPEAR) += pwm-spear.o
obj-$(CONFIG_PWM_TEGRA) += pwm-tegra.o
......
This diff is collapsed.
#ifndef __PWM_RENESAS_TPU_H__
#define __PWM_RENESAS_TPU_H__
#include <linux/pwm.h>
#define TPU_CHANNEL_MAX 4
struct tpu_pwm_channel_data {
enum pwm_polarity polarity;
};
struct tpu_pwm_platform_data {
struct tpu_pwm_channel_data channels[TPU_CHANNEL_MAX];
};
#endif /* __PWM_RENESAS_TPU_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment