diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
commit | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (patch) | |
tree | 869d633803eb7c429624d3bd16a6117816849763 /arch/arm/plat-s3c | |
parent | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (diff) | |
parent | b7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (diff) |
Merge branch 'master' into devel
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r-- | arch/arm/plat-s3c/pwm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/pwm.c b/arch/arm/plat-s3c/pwm.c index f3d37ac5595b..4fdc5b307fd2 100644 --- a/arch/arm/plat-s3c/pwm.c +++ b/arch/arm/plat-s3c/pwm.c | |||
@@ -247,6 +247,10 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | |||
247 | 247 | ||
248 | tcmp = duty_ns / tin_ns; | 248 | tcmp = duty_ns / tin_ns; |
249 | tcmp = tcnt - tcmp; | 249 | tcmp = tcnt - tcmp; |
250 | /* the pwm hw only checks the compare register after a decrement, | ||
251 | so the pin never toggles if tcmp = tcnt */ | ||
252 | if (tcmp == tcnt) | ||
253 | tcmp--; | ||
250 | 254 | ||
251 | pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt); | 255 | pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt); |
252 | 256 | ||