From: Viktor Barna <viktor.barna@xxxxxxxxxx> (Part of the split. Please, take a look at the cover letter for more details). Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx> --- .../net/wireless/celeno/cl8k/utils/timer.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 drivers/net/wireless/celeno/cl8k/utils/timer.h diff --git a/drivers/net/wireless/celeno/cl8k/utils/timer.h b/drivers/net/wireless/celeno/cl8k/utils/timer.h new file mode 100644 index 000000000000..1481d8d78db4 --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/utils/timer.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright(c) 2019-2021, Celeno Communications Ltd. */ + +#ifndef CL_TIMER_H +#define CL_TIMER_H + +#include <linux/timer.h> + +struct cl_timer { + struct timer_list obj; + void (*f)(unsigned long data); + unsigned long data; + atomic_t period; + bool periodic; + bool enable; +}; + +void cl_timer_init(struct cl_timer *timer, + void (*f)(unsigned long data), + unsigned long data, + unsigned long period, + bool periodic); +void cl_timer_period_set(struct cl_timer *timer, unsigned long period); +void cl_timer_enable(struct cl_timer *timer); +void cl_timer_disable(struct cl_timer *timer); +void cl_timer_disable_sync(struct cl_timer *timer); +void cl_timer_rearm(struct cl_timer *timer); +int cl_timer_rearm_offset(struct cl_timer *timer, unsigned long time_offset); + +#endif /* CL_TIMER_H */ -- 2.30.0 ________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose. ________________________________