diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-16 22:20:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-16 22:20:43 +0200 |
commit | c500ce38e52bb2f526b84f41314a9a9f83a2fdf5 (patch) | |
tree | 242bca2c4d3dfd24a2497bba0ac9351f2066e469 /drivers/pwm/pwm-tiecap.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending (diff) | |
parent | pwm: pwm-tiehrpwm: Fix conflicting channel period setting (diff) | |
download | linux-c500ce38e52bb2f526b84f41314a9a9f83a2fdf5.tar.xz linux-c500ce38e52bb2f526b84f41314a9a9f83a2fdf5.zip |
Merge tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm
Pull pwm fixes from Thierry Reding:
"While this comes a bit later than I had wished, both patches are
rather minor and touch only new drivers so I think these are still
safe for merging."
* tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm:
pwm: pwm-tiehrpwm: Fix conflicting channel period setting
pwm: pwm-tiecap: Disable APWM mode after configure
Diffstat (limited to 'drivers/pwm/pwm-tiecap.c')
-rw-r--r-- | drivers/pwm/pwm-tiecap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 0b66d0f25922..4b6688909fee 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c @@ -100,6 +100,13 @@ static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, writel(period_cycles, pc->mmio_base + CAP3); } + if (!test_bit(PWMF_ENABLED, &pwm->flags)) { + reg_val = readw(pc->mmio_base + ECCTL2); + /* Disable APWM mode to put APWM output Low */ + reg_val &= ~ECCTL2_APWM_MODE; + writew(reg_val, pc->mmio_base + ECCTL2); + } + pm_runtime_put_sync(pc->chip.dev); return 0; } |