diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-25 11:06:04 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-25 11:06:04 +0300 |
commit | 0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8 (patch) | |
tree | 71c906207227dd8753a0191db9304035ec3471a4 /drivers/pwm/pwm-twl.c | |
parent | 78010cd9736ec571796f4404524ed575b81238b9 (diff) | |
parent | 5481e27f6fd06b7cb902072e81d6b083db8155eb (diff) | |
download | linux-0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8.tar.xz |
Merge remote-tracking branch 'airlied/drm-next' into topic/drm-misc
Backmerge latest drm-next to have a baseline for the
s/fence/dma_fence/ patch from Chris.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/pwm/pwm-twl.c')
-rw-r--r-- | drivers/pwm/pwm-twl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index 04f76725d591..7a993b056638 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c @@ -269,6 +269,22 @@ static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) goto out; } + val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXEN); + + ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG); + if (ret < 0) { + dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); + goto out; + } + + val &= ~TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXEN); + + ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG); + if (ret < 0) { + dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); + goto out; + } + twl->twl6030_toggle3 = val; out: mutex_unlock(&twl->mutex); |