From: Stefan Agner Date: Sun, 28 Sep 2014 23:50:05 +0000 (+0200) Subject: clocksource: vf_pit_timer: Support shutdown mode X-Git-Tag: firefly_0821_release~176^2~3104^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=04f7e3e5134b9517bd9a78a84a9ee0f982d3ebdd;p=firefly-linux-kernel-4.4.55.git clocksource: vf_pit_timer: Support shutdown mode In order to avoid waking up the system in a low power mode, the clocksource should not generate interrupts anymore. Disable the PIT timer interrupt when changing into the CLOCK_EVT_MODE_SHUTDOWN mode. [dlezcano] : remove superfluous empty line Signed-off-by: Stefan Agner Signed-off-by: Daniel Lezcano Acked-by: Bill Pringlemeir --- diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c index a918bc481c52..b45ac6229b57 100644 --- a/drivers/clocksource/vf_pit_timer.c +++ b/drivers/clocksource/vf_pit_timer.c @@ -93,6 +93,10 @@ static void pit_set_mode(enum clock_event_mode mode, case CLOCK_EVT_MODE_PERIODIC: pit_set_next_event(cycle_per_jiffy, evt); break; + case CLOCK_EVT_MODE_SHUTDOWN: + case CLOCK_EVT_MODE_UNUSED: + pit_timer_disable(); + break; default: break; }