qcacmn: Add qdf wrapper for jiffes_to_nsecs()
Add qdf wrapper for kernel API jiffies_to_nsecs(). Change-Id: I023dc2293f731bd2ee20278785ebf14ffba4787b CRs-Fixed: 3396843
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4f8ff9d20f
commit
bc5188b115
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -119,6 +119,14 @@ qdf_time_t qdf_system_ticks(void);
|
|||||||
*/
|
*/
|
||||||
uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks);
|
uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_system_ticks_to_nsecs - convert ticks to nanoseconds
|
||||||
|
* @clock_ticks: Number of ticks
|
||||||
|
*
|
||||||
|
* Return: unsigned int Time in nanoseconds
|
||||||
|
*/
|
||||||
|
uint32_t qdf_system_ticks_to_nsecs(unsigned long clock_ticks);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_system_msecs_to_ticks - convert milliseconds to ticks
|
* qdf_system_msecs_to_ticks - convert milliseconds to ticks
|
||||||
* @msec: Time in milliseconds
|
* @msec: Time in milliseconds
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -161,6 +161,17 @@ static inline uint32_t __qdf_system_ticks_to_msecs(unsigned long ticks)
|
|||||||
return jiffies_to_msecs(ticks);
|
return jiffies_to_msecs(ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_system_ticks_to_nsecs() - convert system ticks into nano seconds
|
||||||
|
* @ticks: System ticks
|
||||||
|
*
|
||||||
|
* Return: system tick converted into nano seconds
|
||||||
|
*/
|
||||||
|
static inline uint32_t __qdf_system_ticks_to_nsecs(unsigned long ticks)
|
||||||
|
{
|
||||||
|
return jiffies_to_nsecs(ticks);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_system_msecs_to_ticks() - convert milli seconds into system ticks
|
* __qdf_system_msecs_to_ticks() - convert milli seconds into system ticks
|
||||||
* @msecs: Milli seconds
|
* @msecs: Milli seconds
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -96,6 +96,13 @@ uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks)
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_system_ticks_to_msecs);
|
qdf_export_symbol(qdf_system_ticks_to_msecs);
|
||||||
|
|
||||||
|
uint32_t qdf_system_ticks_to_nsecs(unsigned long clock_ticks)
|
||||||
|
{
|
||||||
|
return __qdf_system_ticks_to_nsecs(clock_ticks);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_system_ticks_to_nsecs);
|
||||||
|
|
||||||
qdf_time_t qdf_system_msecs_to_ticks(uint32_t msecs)
|
qdf_time_t qdf_system_msecs_to_ticks(uint32_t msecs)
|
||||||
{
|
{
|
||||||
return __qdf_system_msecs_to_ticks(msecs);
|
return __qdf_system_msecs_to_ticks(msecs);
|
||||||
|
Reference in New Issue
Block a user