Lines Matching full:clocksource

2 /*  linux/include/linux/clocksource.h
6 * If you are not a clocksource, or timekeeping code, you should
23 struct clocksource;
28 #include <asm/clocksource.h>
31 #include <vdso/clocksource.h>
34 * struct clocksource - hardware abstraction for a free running counter
38 * @read: Returns a cycle value, passes clocksource as argument
43 * @max_idle_ns: Maximum idle time permitted by the clocksource (nsecs)
48 * @name: Pointer to clocksource name
53 * to assign your clocksource a rating
59 * A correct and usable clocksource.
61 * A reasonably fast and accurate clocksource.
63 * The ideal clocksource. A must-use where
66 * @enable: Optional function to enable the clocksource
67 * @disable: Optional function to disable the clocksource
68 * @suspend: Optional suspend function for the clocksource
69 * @resume: Optional resume function for the clocksource
70 * @mark_unstable: Optional function to inform the clocksource driver that
71 * the watchdog marked the clocksource unstable
75 * @cs_last: Last clocksource value for clocksource watchdog
77 * @owner: Module reference, must be set by clocksource in modules
83 * The pointer to the clocksource itself is handed to the read
85 * clocksource into your own struct. Depending on the amount of
89 struct clocksource { struct
90 u64 (*read)(struct clocksource *cs); argument
106 int (*enable)(struct clocksource *cs); argument
107 void (*disable)(struct clocksource *cs); argument
108 void (*suspend)(struct clocksource *cs); argument
109 void (*resume)(struct clocksource *cs); argument
110 void (*mark_unstable)(struct clocksource *cs); argument
111 void (*tick_stable)(struct clocksource *cs); argument
157 * @khz: Clocksource frequency in KHz
158 * @shift_constant: Clocksource shift factor
161 * multiplier, given the clocksource shift value
170 * @hz: Clocksource frequency in Hz
171 * @shift_constant: Clocksource shift factor
175 * clocksource shift value
183 * clocksource_cyc2ns - converts clocksource cycles to nanoseconds
188 * Converts clocksource cycles to nanoseconds, using the given @mult and @shift.
190 * with absolute clocksource cycles (as those will easily overflow),
191 * but is only intended to be used with relative (delta) clocksource cycles.
201 extern int clocksource_unregister(struct clocksource*);
203 extern void clocksource_change_rating(struct clocksource *cs, int rating);
206 extern struct clocksource * __init clocksource_default_clock(void);
207 extern void clocksource_mark_unstable(struct clocksource *cs);
209 clocksource_start_suspend_timing(struct clocksource *cs, u64 start_cycles);
210 extern u64 clocksource_stop_suspend_timing(struct clocksource *cs, u64 now);
222 __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
224 __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq);
227 * Don't call this unless you are a default clocksource
230 static inline int __clocksource_register(struct clocksource *cs) in __clocksource_register()
235 static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) in clocksource_register_hz()
240 static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) in clocksource_register_khz()
245 static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz) in __clocksource_update_freq_hz()
250 static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz) in __clocksource_update_freq_khz()
256 extern void clocksource_arch_init(struct clocksource *cs);
258 static inline void clocksource_arch_init(struct clocksource *cs) { } in clocksource_arch_init()
261 extern int timekeeping_notify(struct clocksource *clock);
263 extern u64 clocksource_mmio_readl_up(struct clocksource *);
264 extern u64 clocksource_mmio_readl_down(struct clocksource *);
265 extern u64 clocksource_mmio_readw_up(struct clocksource *);
266 extern u64 clocksource_mmio_readw_down(struct clocksource *);
269 unsigned long, int, unsigned, u64 (*)(struct clocksource *));