Skip to content

Commit

Permalink
clocksource: vf_pit_timer: Support shutdown mode
Browse files Browse the repository at this point in the history
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 <stefan@agner.ch>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
  • Loading branch information
Stefan Agner authored and Daniel Lezcano committed Sep 28, 2014
1 parent e4a6b37 commit 04f7e3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/clocksource/vf_pit_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 04f7e3e

Please sign in to comment.