diff options
Diffstat (limited to 'include/linux/clockchips.h')
| -rw-r--r-- | include/linux/clockchips.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index d6733e27af34..81e803e90aa4 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -45,20 +45,22 @@ enum clock_event_nofitiers { | |||
| 45 | */ | 45 | */ |
| 46 | #define CLOCK_EVT_FEAT_PERIODIC 0x000001 | 46 | #define CLOCK_EVT_FEAT_PERIODIC 0x000001 |
| 47 | #define CLOCK_EVT_FEAT_ONESHOT 0x000002 | 47 | #define CLOCK_EVT_FEAT_ONESHOT 0x000002 |
| 48 | #define CLOCK_EVT_FEAT_KTIME 0x000004 | ||
| 48 | /* | 49 | /* |
| 49 | * x86(64) specific misfeatures: | 50 | * x86(64) specific misfeatures: |
| 50 | * | 51 | * |
| 51 | * - Clockevent source stops in C3 State and needs broadcast support. | 52 | * - Clockevent source stops in C3 State and needs broadcast support. |
| 52 | * - Local APIC timer is used as a dummy device. | 53 | * - Local APIC timer is used as a dummy device. |
| 53 | */ | 54 | */ |
| 54 | #define CLOCK_EVT_FEAT_C3STOP 0x000004 | 55 | #define CLOCK_EVT_FEAT_C3STOP 0x000008 |
| 55 | #define CLOCK_EVT_FEAT_DUMMY 0x000008 | 56 | #define CLOCK_EVT_FEAT_DUMMY 0x000010 |
| 56 | 57 | ||
| 57 | /** | 58 | /** |
| 58 | * struct clock_event_device - clock event device descriptor | 59 | * struct clock_event_device - clock event device descriptor |
| 59 | * @event_handler: Assigned by the framework to be called by the low | 60 | * @event_handler: Assigned by the framework to be called by the low |
| 60 | * level handler of the event source | 61 | * level handler of the event source |
| 61 | * @set_next_event: set next event function | 62 | * @set_next_event: set next event function using a clocksource delta |
| 63 | * @set_next_ktime: set next event function using a direct ktime value | ||
| 62 | * @next_event: local storage for the next event in oneshot mode | 64 | * @next_event: local storage for the next event in oneshot mode |
| 63 | * @max_delta_ns: maximum delta value in ns | 65 | * @max_delta_ns: maximum delta value in ns |
| 64 | * @min_delta_ns: minimum delta value in ns | 66 | * @min_delta_ns: minimum delta value in ns |
| @@ -81,6 +83,8 @@ struct clock_event_device { | |||
| 81 | void (*event_handler)(struct clock_event_device *); | 83 | void (*event_handler)(struct clock_event_device *); |
| 82 | int (*set_next_event)(unsigned long evt, | 84 | int (*set_next_event)(unsigned long evt, |
| 83 | struct clock_event_device *); | 85 | struct clock_event_device *); |
| 86 | int (*set_next_ktime)(ktime_t expires, | ||
| 87 | struct clock_event_device *); | ||
| 84 | ktime_t next_event; | 88 | ktime_t next_event; |
| 85 | u64 max_delta_ns; | 89 | u64 max_delta_ns; |
| 86 | u64 min_delta_ns; | 90 | u64 min_delta_ns; |
| @@ -140,7 +144,7 @@ extern void clockevents_set_mode(struct clock_event_device *dev, | |||
| 140 | enum clock_event_mode mode); | 144 | enum clock_event_mode mode); |
| 141 | extern int clockevents_register_notifier(struct notifier_block *nb); | 145 | extern int clockevents_register_notifier(struct notifier_block *nb); |
| 142 | extern int clockevents_program_event(struct clock_event_device *dev, | 146 | extern int clockevents_program_event(struct clock_event_device *dev, |
| 143 | ktime_t expires, ktime_t now); | 147 | ktime_t expires, bool force); |
| 144 | 148 | ||
| 145 | extern void clockevents_handle_noop(struct clock_event_device *dev); | 149 | extern void clockevents_handle_noop(struct clock_event_device *dev); |
| 146 | 150 | ||
