Skip to content

Commit 30006b7

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: cros-ec: Explicitly set .polarity in .get_state()
The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. Reviewed-by: Guenter Roeck <[email protected]> Fixes: 1f0d3bb ("pwm: Add ChromeOS EC PWM driver") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 6f57937 commit 30006b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pwm/pwm-cros-ec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ static int cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
198198

199199
state->enabled = (ret > 0);
200200
state->period = EC_PWM_MAX_DUTY;
201+
state->polarity = PWM_POLARITY_NORMAL;
201202

202203
/*
203204
* Note that "disabled" and "duty cycle == 0" are treated the same. If

0 commit comments

Comments
 (0)