diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-04-14 21:17:37 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-05-17 14:47:30 +0200 |
commit | a8c3862551e063344f80c3e05d595f9d8836f355 (patch) | |
tree | 6e4741194a46b669b6f7945c1d41920371a2972b /include/linux/pwm.h | |
parent | 102232c54601071304cb6946f9758e3cd74d3e1e (diff) | |
download | linux-stable-a8c3862551e063344f80c3e05d595f9d8836f355.tar.gz linux-stable-a8c3862551e063344f80c3e05d595f9d8836f355.tar.bz2 linux-stable-a8c3862551e063344f80c3e05d595f9d8836f355.zip |
pwm: Keep PWM state in sync with hardware state
Before the introduction of pwm_args, the core was resetting the PWM
period and polarity states to the reference values (those provided
through the DT, a PWM lookup table or hardcoded in the driver).
Now that all PWM users are correctly using pwm_args to configure their
PWM device, we can safely remove the pwm_apply_args() call in pwm_get()
and of_pwm_get().
We can also get rid of the pwm_set_period() call in pwm_apply_args(),
because PWM users are now directly using pargs->period instead of
pwm_get_period(). By doing that we avoid messing with the current PWM
period.
The only remaining bit in pwm_apply_args() is the initial polarity
setting, and it should go away when all PWM users have been patched to
use the atomic API (with this API the polarity will be set along with
other PWM arguments when configuring the PWM).
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/linux/pwm.h')
-rw-r--r-- | include/linux/pwm.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index d2e7430ccedb..7caf549f720e 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -171,7 +171,6 @@ static inline void pwm_get_args(const struct pwm_device *pwm, static inline void pwm_apply_args(struct pwm_device *pwm) { - pwm_set_period(pwm, pwm->args.period); pwm_set_polarity(pwm, pwm->args.polarity); } |