clockevents/drivers/em_sti: Migrate to new 'set-state' interface
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 12 Jun 2015 08:00:17 +0000 (13:30 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 6 Aug 2015 10:16:42 +0000 (12:16 +0200)
commit75f940615aa93cb681b36e355b3f9509d955f547
treed61a148214536b4b5d681932d4b0daf82a4ed114
parent8f9327cbb6e87ce1bed3e5dfbac70d8a96c6d1cc
clockevents/drivers/em_sti: Migrate to new 'set-state' interface

Migrate em_sti driver to the new 'set-state' interface provided by
the clockevents core, the earlier 'set-mode' interface is marked
obsolete now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.

NOTE: This also drops a special check:

if (old_mode == CLOCK_EVT_MODE_ONESHOT)
em_sti_stop(p, USER_CLOCKEVENT);

as it doesn't look like that important. This driver only supports
ONESHOT and we can only move only to SHUTDOWN from ONESHOT and.
Also on second call (on shutdown), em_sti_stop() would return without
disabling the device again.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/em_sti.c