aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clockchips.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/clockchips.h')
-rw-r--r--include/linux/clockchips.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 2e4cb67f6e56..59af26b54d15 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -39,6 +39,8 @@ enum clock_event_mode {
39 CLOCK_EVT_MODE_PERIODIC, 39 CLOCK_EVT_MODE_PERIODIC,
40 CLOCK_EVT_MODE_ONESHOT, 40 CLOCK_EVT_MODE_ONESHOT,
41 CLOCK_EVT_MODE_RESUME, 41 CLOCK_EVT_MODE_RESUME,
42
43 /* Legacy ->set_mode() callback doesn't support below modes */
42}; 44};
43 45
44/* 46/*
@@ -81,7 +83,11 @@ enum clock_event_mode {
81 * @mode: operating mode assigned by the management code 83 * @mode: operating mode assigned by the management code
82 * @features: features 84 * @features: features
83 * @retries: number of forced programming retries 85 * @retries: number of forced programming retries
84 * @set_mode: set mode function 86 * @set_mode: legacy set mode function, only for modes <= CLOCK_EVT_MODE_RESUME.
87 * @set_mode_periodic: switch mode to periodic, if !set_mode
88 * @set_mode_oneshot: switch mode to oneshot, if !set_mode
89 * @set_mode_shutdown: switch mode to shutdown, if !set_mode
90 * @set_mode_resume: resume clkevt device, if !set_mode
85 * @broadcast: function to broadcast events 91 * @broadcast: function to broadcast events
86 * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration 92 * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration
87 * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration 93 * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration
@@ -108,9 +114,20 @@ struct clock_event_device {
108 unsigned int features; 114 unsigned int features;
109 unsigned long retries; 115 unsigned long retries;
110 116
111 void (*broadcast)(const struct cpumask *mask); 117 /*
118 * Mode transition callback(s): Only one of the two groups should be
119 * defined:
120 * - set_mode(), only for modes <= CLOCK_EVT_MODE_RESUME.
121 * - set_mode_{shutdown|periodic|oneshot|resume}().
122 */
112 void (*set_mode)(enum clock_event_mode mode, 123 void (*set_mode)(enum clock_event_mode mode,
113 struct clock_event_device *); 124 struct clock_event_device *);
125 int (*set_mode_periodic)(struct clock_event_device *);
126 int (*set_mode_oneshot)(struct clock_event_device *);
127 int (*set_mode_shutdown)(struct clock_event_device *);
128 int (*set_mode_resume)(struct clock_event_device *);
129
130 void (*broadcast)(const struct cpumask *mask);
114 void (*suspend)(struct clock_event_device *); 131 void (*suspend)(struct clock_event_device *);
115 void (*resume)(struct clock_event_device *); 132 void (*resume)(struct clock_event_device *);
116 unsigned long min_delta_ticks; 133 unsigned long min_delta_ticks;