summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-08-03 17:58:02 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-08-03 17:58:02 +0100
commit38a6fe8c013e72c402b37a7ea400387120f460d8 (patch)
tree2b27c3bee7d8fe26d39084c95dca065b47444004 /arch/arm
parent320145fac91955ee35a6af7e1c2b42388a17b3d8 (diff)
parent909db80297ba65699a77d877f7bf618ba960f6fc (diff)
downloadlinux-3.10-38a6fe8c013e72c402b37a7ea400387120f460d8.tar.gz
linux-3.10-38a6fe8c013e72c402b37a7ea400387120f460d8.tar.bz2
linux-3.10-38a6fe8c013e72c402b37a7ea400387120f460d8.zip
Merge branch 's3c-fixes-rc4-2' of git://aeryn.fluff.org.uk/bjdooks/linux
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-s3c24xx/pwm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c
index 0120b760315..82a6d4de02a 100644
--- a/arch/arm/plat-s3c24xx/pwm.c
+++ b/arch/arm/plat-s3c24xx/pwm.c
@@ -246,6 +246,10 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
tcmp = duty_ns / tin_ns;
tcmp = tcnt - tcmp;
+ /* the pwm hw only checks the compare register after a decrement,
+ so the pin never toggles if tcmp = tcnt */
+ if (tcmp == tcnt)
+ tcmp--;
pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt);