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/clock.c | |
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/clock.c')
-rw-r--r-- | arch/arm/mach-ep93xx/clock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index b6b53447b1b4..3dd0e2a23095 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -72,6 +72,9 @@ static struct clk clk_keypad = { | |||
72 | .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, | 72 | .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, |
73 | .set_rate = set_keytchclk_rate, | 73 | .set_rate = set_keytchclk_rate, |
74 | }; | 74 | }; |
75 | static struct clk clk_pwm = { | ||
76 | .rate = EP93XX_EXT_CLK_RATE, | ||
77 | }; | ||
75 | 78 | ||
76 | /* DMA Clocks */ | 79 | /* DMA Clocks */ |
77 | static struct clk clk_m2p0 = { | 80 | static struct clk clk_m2p0 = { |
@@ -137,6 +140,7 @@ static struct clk_lookup clocks[] = { | |||
137 | INIT_CK(NULL, "pll2", &clk_pll2), | 140 | INIT_CK(NULL, "pll2", &clk_pll2), |
138 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), | 141 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), |
139 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), | 142 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), |
143 | INIT_CK(NULL, "pwm_clk", &clk_pwm), | ||
140 | INIT_CK(NULL, "m2p0", &clk_m2p0), | 144 | INIT_CK(NULL, "m2p0", &clk_m2p0), |
141 | INIT_CK(NULL, "m2p1", &clk_m2p1), | 145 | INIT_CK(NULL, "m2p1", &clk_m2p1), |
142 | INIT_CK(NULL, "m2p2", &clk_m2p2), | 146 | INIT_CK(NULL, "m2p2", &clk_m2p2), |