mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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 <groeck@chromium.org>
Fixes: 1f0d3bb027
("pwm: Add ChromeOS EC PWM driver")
Link: https://lore.kernel.org/r/20230228135508.1798428-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
6f57937980
commit
30006b77c7
1 changed files with 1 additions and 0 deletions
|
@ -198,6 +198,7 @@ static int cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
|
||||
state->enabled = (ret > 0);
|
||||
state->period = EC_PWM_MAX_DUTY;
|
||||
state->polarity = PWM_POLARITY_NORMAL;
|
||||
|
||||
/*
|
||||
* Note that "disabled" and "duty cycle == 0" are treated the same. If
|
||||
|
|
Loading…
Add table
Reference in a new issue