diff options
author | Hartley Sweeten <hartleys@visionengravers.com> | 2009-07-29 17:41:06 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-30 12:45:43 -0400 |
commit | ef12379f205bed7e92434e12ddd44e62d13bebe1 (patch) | |
tree | c372f5741826e7fbdaec8eac86191b52e3e621af /arch/arm/mach-ep93xx/include | |
parent | 3aa7a9a3cf8774f6701b1903a6353f9545f561ce (diff) |
ARM: 5628/1: ep93xx: Introduce Pulse Width Modulator (PWM) driver
The EP93xx features two PWMs (one on the EP9307) with the following
features:
* Configurable dual output
* Separate input clocks for each PWM output
* 16-bit resolution
* Programmable pulse width (duty cycle), interval (frequency), and
polarity
This adds the necessary core support as well as the driver. A sysfs
interface is provided to control the PWM outputs.
Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx/include')
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/platform.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index a11ae779baa0..ea78e908fc82 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -147,6 +147,7 @@ | |||
147 | #define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000) | 147 | #define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000) |
148 | #define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) | 148 | #define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) |
149 | 149 | ||
150 | #define EP93XX_PWM_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00110000) | ||
150 | #define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) | 151 | #define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) |
151 | 152 | ||
152 | #define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) | 153 | #define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 0af0a3ba7047..5f5fa6574d34 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | struct i2c_board_info; | 7 | struct i2c_board_info; |
8 | struct platform_device; | ||
8 | 9 | ||
9 | struct ep93xx_eth_data | 10 | struct ep93xx_eth_data |
10 | { | 11 | { |
@@ -32,6 +33,9 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | |||
32 | 33 | ||
33 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); | 34 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); |
34 | void ep93xx_register_i2c(struct i2c_board_info *devices, int num); | 35 | void ep93xx_register_i2c(struct i2c_board_info *devices, int num); |
36 | void ep93xx_register_pwm(int pwm0, int pwm1); | ||
37 | int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); | ||
38 | void ep93xx_pwm_release_gpio(struct platform_device *pdev); | ||
35 | 39 | ||
36 | void ep93xx_init_devices(void); | 40 | void ep93xx_init_devices(void); |
37 | extern struct sys_timer ep93xx_timer; | 41 | extern struct sys_timer ep93xx_timer; |