pwm: Switch to the atomic API

Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Boris Brezillon
2016-04-14 21:17:43 +02:00
committed by Thierry Reding
parent a07136fdcf
commit 39100ceea7
2 changed files with 41 additions and 12 deletions

View File

@@ -948,13 +948,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
for (i = 0; i < chip->npwm; i++) {
struct pwm_device *pwm = &chip->pwms[i];
struct pwm_state state;
pwm_get_state(pwm, &state);
seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
if (test_bit(PWMF_REQUESTED, &pwm->flags))
seq_puts(s, " requested");
if (pwm_is_enabled(pwm))
if (state.enabled)
seq_puts(s, " enabled");
seq_puts(s, "\n");