diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-02-27 06:51:33 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-27 05:26:19 -0400 |
commit | 77e32c89a7117614ab3d66d20c1088de721abfaa (patch) | |
tree | 197d7d66684509bffc639fd31870026e0c3dafbe /kernel/time/timer_list.c | |
parent | 554ef3876c6acdff1331feab10275e9e9e0adb84 (diff) |
clockevents: Manage device's state separately for the core
'enum clock_event_mode' is used for two purposes today:
- to pass mode to the driver of clockevent device::set_mode().
- for managing state of the device for clockevents core.
For supporting new modes/states we have moved away from the
legacy set_mode() callback to new per-mode/state callbacks. New
modes/states shouldn't be exposed to the legacy (now OBSOLOTE)
callbacks and so we shouldn't add new states to 'enum
clock_event_mode'.
Lets have separate enums for the two use cases mentioned above.
Keep using the earlier enum for legacy set_mode() callback and
mark it OBSOLETE. And add another enum to clearly specify the
possible states of a clockevent device.
This also renames the newly added per-mode callbacks to reflect
state changes.
We haven't got rid of 'mode' member of 'struct
clock_event_device' as it is used by some of the clockevent
drivers and it would automatically die down once we migrate
those drivers to the new interface. It ('mode') is only updated
now for the drivers using the legacy interface.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: linaro-kernel@lists.linaro.org
Cc: linaro-networking@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/b6b0143a8a57bd58352ad35e08c25424c879c0cb.1425037853.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time/timer_list.c')
-rw-r--r-- | kernel/time/timer_list.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 2b3e9393034d..05aa5590106a 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -233,21 +233,21 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu) | |||
233 | print_name_offset(m, dev->set_mode); | 233 | print_name_offset(m, dev->set_mode); |
234 | SEQ_printf(m, "\n"); | 234 | SEQ_printf(m, "\n"); |
235 | } else { | 235 | } else { |
236 | if (dev->set_mode_shutdown) { | 236 | if (dev->set_state_shutdown) { |
237 | SEQ_printf(m, " shutdown: "); | 237 | SEQ_printf(m, " shutdown: "); |
238 | print_name_offset(m, dev->set_mode_shutdown); | 238 | print_name_offset(m, dev->set_state_shutdown); |
239 | SEQ_printf(m, "\n"); | 239 | SEQ_printf(m, "\n"); |
240 | } | 240 | } |
241 | 241 | ||
242 | if (dev->set_mode_periodic) { | 242 | if (dev->set_state_periodic) { |
243 | SEQ_printf(m, " periodic: "); | 243 | SEQ_printf(m, " periodic: "); |
244 | print_name_offset(m, dev->set_mode_periodic); | 244 | print_name_offset(m, dev->set_state_periodic); |
245 | SEQ_printf(m, "\n"); | 245 | SEQ_printf(m, "\n"); |
246 | } | 246 | } |
247 | 247 | ||
248 | if (dev->set_mode_oneshot) { | 248 | if (dev->set_state_oneshot) { |
249 | SEQ_printf(m, " oneshot: "); | 249 | SEQ_printf(m, " oneshot: "); |
250 | print_name_offset(m, dev->set_mode_oneshot); | 250 | print_name_offset(m, dev->set_state_oneshot); |
251 | SEQ_printf(m, "\n"); | 251 | SEQ_printf(m, "\n"); |
252 | } | 252 | } |
253 | 253 | ||