mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-24 10:13:00 +03:00
tegra: hwpm: add wrapper for timeout functions
Move timeout related code using Linux APIs to os/linux path. Add OS agnostic wrappers for timeout functions. Jira THWPM-59 Change-Id: I8e6aa8dabd3a54ecc8a946090d11d036c97a104b Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2735074 Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
486ec4a24c
commit
74dee85a03
31
os/linux/timers.h
Normal file
31
os/linux/timers.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef TEGRA_HWPM_OS_LINUX_TIMERS_H
|
||||
#define TEGRA_HWPM_OS_LINUX_TIMERS_H
|
||||
|
||||
struct tegra_hwpm_timeout {
|
||||
u32 max_attempts;
|
||||
u32 attempted;
|
||||
};
|
||||
|
||||
struct tegra_soc_hwpm;
|
||||
|
||||
int tegra_hwpm_timeout_init_impl(struct tegra_soc_hwpm *hwpm,
|
||||
struct tegra_hwpm_timeout *timeout, u32 retries);
|
||||
int tegra_hwpm_timeout_expired_impl(struct tegra_soc_hwpm *hwpm,
|
||||
struct tegra_hwpm_timeout *timeout);
|
||||
|
||||
void tegra_hwpm_msleep_impl(unsigned int msecs);
|
||||
|
||||
#endif /* TEGRA_HWPM_OS_LINUX_TIMERS_H */
|
||||
Reference in New Issue
Block a user