pwm: sun4i: Improve hardware read out
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 30 May 2017 19:32:07 +0000 (21:32 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 6 Jul 2017 07:05:17 +0000 (09:05 +0200)
commit93e0dfb2c52f9cb7a7899156475b4e7b0bee7de3
treee3e9a4b474c39aa289753b483028b6bde39de453
parentc034a6fda0179a85cd571c386ed6748188b0a79c
pwm: sun4i: Improve hardware read out

Implement .get_state instead of only reading the polarity at probe time.
This allows to get the proper state, period and duty cycle.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sun4i.c