pwm: hibvt: Explicitly set .polarity in .get_state()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 22 Mar 2023 21:45:40 +0000 (22:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Apr 2023 14:55:18 +0000 (16:55 +0200)
commit98ba763cc91c8e0117ccc28e300640eee52f9b44
tree78519cd1958bf42ad29a3a711b41b96b653762bb
parent547cc8dae2474605490912c64123c3df7f36df38
pwm: hibvt: Explicitly set .polarity in .get_state()

[ Upstream commit 6f57937980142715e927697a6ffd2050f38ed6f6 ]

The driver only both polarities. Complete the implementation of
.get_state() by setting .polarity according to the configured hardware
state.

Fixes: d09f00810850 ("pwm: Add PWM driver for HiSilicon BVT SOCs")
Link: https://lore.kernel.org/r/20230228135508.1798428-2-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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-hibvt.c