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: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Simon Horman <horms@verge.net.au> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
76abbdde2d
commit
99b82abb0a
4 changed files with 502 additions and 0 deletions
16
include/linux/platform_data/pwm-renesas-tpu.h
Normal file
16
include/linux/platform_data/pwm-renesas-tpu.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#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__ */
|
Loading…
Add table
Add a link
Reference in a new issue