Skip to content

Commit

Permalink
Merge tag 'pwm/for-5.4-rc6' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/thierry.reding/linux-pwm

Pull pwm fixes from Thierry Reding:
 "It turned out that relying solely on drivers storing all the PWM state
  in hardware was a little premature and causes a number of subtle (and
  some not so subtle) regressions. Revert the offending patch for now"

* tag 'pwm/for-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  Revert "pwm: Let pwm_get_state() return the last implemented state"
  • Loading branch information
torvalds committed Nov 2, 2019
2 parents f83e148 + 40a6b9a commit e935842
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/pwm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,7 @@ int pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state)
if (err)
return err;

/*
* .apply might have to round some values in *state, if possible
* read the actually implemented value back.
*/
if (chip->ops->get_state)
chip->ops->get_state(chip, pwm, &pwm->state);
else
pwm->state = *state;
pwm->state = *state;
} else {
/*
* FIXME: restore the initial state in case of error.
Expand Down

0 comments on commit e935842

Please sign in to comment.