pwm: iqs620a: Explicitly set .polarity in .get_state()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 22 Mar 2023 21:45:42 +0000 (22:45 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 23 Mar 2023 13:44:41 +0000 (14:44 +0100)
The driver only supports normal polarity. Complete the implementation of
.get_state() by setting .polarity accordingly.

Fixes: 6f0841a8197b ("pwm: Add support for Azoteq IQS620A PWM generator")
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20230228135508.1798428-4-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>
drivers/pwm/pwm-iqs620a.c

index 8362b48..47b3141 100644 (file)
@@ -126,6 +126,7 @@ static int iqs620_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
        mutex_unlock(&iqs620_pwm->lock);
 
        state->period = IQS620_PWM_PERIOD_NS;
+       state->polarity = PWM_POLARITY_NORMAL;
 
        return 0;
 }