clocksource: samsung_pwm_timer: Handle suspend/resume correctly
authorTomasz Figa <tomasz.figa@gmail.com>
Sun, 16 Jun 2013 23:11:31 +0000 (01:11 +0200)
committerTomasz Figa <tomasz.figa@gmail.com>
Mon, 5 Aug 2013 23:21:43 +0000 (01:21 +0200)
commit0b96258b420208ebaacc0ef4b21b67dba262badf
tree89bdeebfcbadacdfe614df5c998de38321f03163
parent6792e636d5bfc1b26c25e7ed056b358e1144c6df
clocksource: samsung_pwm_timer: Handle suspend/resume correctly

Current suspend/resume handling of the driver was broken, because:
 - periodic timer was being enabled in CLOCK_EVT_MODE_RESUME mode, which
   does not seem to be correct behavior looking at other platforms,
 - PWM divisors need to be restored, but they were not,
 - clockevent interrupt mask needs to be restored, but it was not,
 - clocksource was being restored in clockevent resume callback.

This patch fixes issues mentioned above, making suspend/resume handling
in the driver correct.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/samsung_pwm_timer.c