diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 16:14:07 (GMT) |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 16:14:07 (GMT) |
commit | 142f2101a86ade2d6c9dfbedf82e1b5b31c8fce6 (patch) | |
tree | 8cced517382b7087df4e89a9e2a00ccac9676a92 /arch/arm/plat-mxc/pwm.c | |
parent | 155bc27fdfbdf65a07a4f8ef3eafa25e57d8b511 (diff) | |
parent | a07613a54d700a974f3a4a657da78ef5d097315d (diff) | |
download | linux-142f2101a86ade2d6c9dfbedf82e1b5b31c8fce6.tar.xz |
Merge branch 'samsung/cleanup' into samsung/driver
Conflicts:
arch/arm/mach-s5p64x0/cpu.c -> common.c
More changes to a file that got moved into common.c,
see previous conflict resolutions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/plat-mxc/pwm.c')
-rw-r--r-- | arch/arm/plat-mxc/pwm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 845de59..e032717 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c @@ -77,6 +77,15 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) do_div(c, period_ns); duty_cycles = c; + /* + * according to imx pwm RM, the real period value should be + * PERIOD value in PWMPR plus 2. + */ + if (period_cycles > 2) + period_cycles -= 2; + else + period_cycles = 0; + writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); writel(period_cycles, pwm->mmio_base + MX3_PWMPR); |