Lines Matching refs:timer
76 void __qdf_hrtimer_start(__qdf_hrtimer_data_t *timer, ktime_t interval, in __qdf_hrtimer_start() argument
81 if (timer->ctx == QDF_CONTEXT_TASKLET) in __qdf_hrtimer_start()
85 hrtimer_start(&timer->u.hrtimer, interval, hrt_mode); in __qdf_hrtimer_start()
89 void __qdf_hrtimer_start(__qdf_hrtimer_data_t *timer, ktime_t interval, in __qdf_hrtimer_start() argument
94 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_start()
95 hrtimer_start(&timer->u.hrtimer, interval, hrt_mode); in __qdf_hrtimer_start()
96 else if (timer->ctx == QDF_CONTEXT_TASKLET) in __qdf_hrtimer_start()
97 tasklet_hrtimer_start(&timer->u.tasklet_hrtimer, in __qdf_hrtimer_start()
112 int __qdf_hrtimer_cancel(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_cancel() argument
114 return hrtimer_cancel(&timer->u.hrtimer); in __qdf_hrtimer_cancel()
118 int __qdf_hrtimer_cancel(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_cancel() argument
120 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_cancel()
121 return hrtimer_cancel(&timer->u.hrtimer); in __qdf_hrtimer_cancel()
122 else if (timer->ctx == QDF_CONTEXT_TASKLET) in __qdf_hrtimer_cancel()
123 return hrtimer_cancel(&timer->u.tasklet_hrtimer.timer); in __qdf_hrtimer_cancel()
131 __qdf_hrtimer_data_t *timer = container_of(arg, __qdf_hrtimer_data_t, in __qdf_hrtimer_cb() local
134 return (enum hrtimer_restart)timer->callback(timer->cb_ctx); in __qdf_hrtimer_cb()
150 static inline void __qdf_hrtimer_init(__qdf_hrtimer_data_t *timer, in __qdf_hrtimer_init() argument
156 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_init()
159 timer->ctx = ctx; in __qdf_hrtimer_init()
160 timer->callback = cback; in __qdf_hrtimer_init()
161 timer->cb_ctx = timer; in __qdf_hrtimer_init()
163 if (timer->ctx == QDF_CONTEXT_TASKLET) in __qdf_hrtimer_init()
171 static inline void __qdf_hrtimer_init(__qdf_hrtimer_data_t *timer, in __qdf_hrtimer_init() argument
177 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_init()
178 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_init()
181 timer->ctx = ctx; in __qdf_hrtimer_init()
182 timer->callback = cback; in __qdf_hrtimer_init()
183 timer->cb_ctx = timer; in __qdf_hrtimer_init()
185 if (timer->ctx == QDF_CONTEXT_HARDWARE) { in __qdf_hrtimer_init()
188 } else if (timer->ctx == QDF_CONTEXT_TASKLET) { in __qdf_hrtimer_init()
204 void __qdf_hrtimer_kill(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_kill() argument
206 hrtimer_cancel(&timer->u.hrtimer); in __qdf_hrtimer_kill()
210 void __qdf_hrtimer_kill(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_kill() argument
212 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_kill()
213 hrtimer_cancel(&timer->u.hrtimer); in __qdf_hrtimer_kill()
214 else if (timer->ctx == QDF_CONTEXT_TASKLET) in __qdf_hrtimer_kill()
215 tasklet_hrtimer_cancel(&timer->u.tasklet_hrtimer); in __qdf_hrtimer_kill()
228 static inline ktime_t __qdf_hrtimer_get_remaining(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_get_remaining() argument
230 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_get_remaining()
235 static inline ktime_t __qdf_hrtimer_get_remaining(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_get_remaining() argument
237 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_get_remaining()
238 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_get_remaining()
240 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_get_remaining()
243 return hrtimer_get_remaining(&tasklet_hrtimer->timer); in __qdf_hrtimer_get_remaining()
257 static inline bool __qdf_hrtimer_is_queued(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_is_queued() argument
259 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_is_queued()
264 static inline bool __qdf_hrtimer_is_queued(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_is_queued() argument
266 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_is_queued()
267 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_is_queued()
269 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_is_queued()
272 return hrtimer_is_queued(&tasklet_hrtimer->timer); in __qdf_hrtimer_is_queued()
286 static inline bool __qdf_hrtimer_callback_running(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_callback_running() argument
288 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_callback_running()
293 static inline bool __qdf_hrtimer_callback_running(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_callback_running() argument
295 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_callback_running()
296 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_callback_running()
298 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_callback_running()
301 return hrtimer_callback_running(&tasklet_hrtimer->timer); in __qdf_hrtimer_callback_running()
316 static inline bool __qdf_hrtimer_active(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_active() argument
318 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_active()
323 static inline bool __qdf_hrtimer_active(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_active() argument
325 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_active()
326 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_active()
328 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_active()
331 return hrtimer_active(&tasklet_hrtimer->timer); in __qdf_hrtimer_active()
344 static inline ktime_t __qdf_hrtimer_cb_get_time(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_cb_get_time() argument
346 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_cb_get_time()
351 static inline ktime_t __qdf_hrtimer_cb_get_time(__qdf_hrtimer_data_t *timer) in __qdf_hrtimer_cb_get_time() argument
353 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_cb_get_time()
354 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_cb_get_time()
356 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_cb_get_time()
359 return hrtimer_cb_get_time(&tasklet_hrtimer->timer); in __qdf_hrtimer_cb_get_time()
374 static inline uint64_t __qdf_hrtimer_forward(__qdf_hrtimer_data_t *timer, in __qdf_hrtimer_forward() argument
378 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_forward()
384 static inline uint64_t __qdf_hrtimer_forward(__qdf_hrtimer_data_t *timer, in __qdf_hrtimer_forward() argument
388 struct hrtimer *hrtimer = &timer->u.hrtimer; in __qdf_hrtimer_forward()
389 struct tasklet_hrtimer *tasklet_hrtimer = &timer->u.tasklet_hrtimer; in __qdf_hrtimer_forward()
391 if (timer->ctx == QDF_CONTEXT_HARDWARE) in __qdf_hrtimer_forward()
394 return hrtimer_forward(&tasklet_hrtimer->timer, now, interval); in __qdf_hrtimer_forward()
408 void __qdf_hrtimer_add_expires(__qdf_hrtimer_data_t *timer, ktime_t interval) in __qdf_hrtimer_add_expires() argument
410 hrtimer_add_expires(&timer->u.hrtimer, interval); in __qdf_hrtimer_add_expires()