]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00242214 IMX PWM:Correct duty cycle calculation
authorLiu Ying <Ying.liu@freescale.com>
Wed, 30 Jan 2013 04:31:55 +0000 (12:31 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:53 +0000 (08:35 +0200)
commit992f95a787f5e2d7247016ac51064e8cd5263d96
tree202f07a013836a0c4385548f3bee93dd69284d36
parent59e4fdb65727485ede0990cc5543d5d154791e01
ENGR00242214 IMX PWM:Correct duty cycle calculation

Since we've already reduced 2 cycles before writing PWMPR
register, the real period cycle on PWMO is the value of
period_cycles (before reducing 2). So, the following commit
message of ENGR00170342, which changes the duty cycle
calculation wrongly, is not reasonable:
===================================================
The chip document says the counter counts up to period_cycles + 1
and then is reset to 0, so the actual period of the PWM wave is
period_cycles + 2
===================================================

Revert "ENGR00170342 PWM: fix pwm output can't be set to 100% full duty"

This reverts commit ac3711f7f24b94db9f78fd7e9bf134c2ecd025ab.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit b42be77aa7842834f0fb50924546701b668d7ab9)
arch/arm/plat-mxc/pwm.c