Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0
2 *
3 * Copyright (c) 2021 MediaTek Inc.
4 * Copyright (c) 2024 Collabora Ltd.
5 * AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
6 */
7
8#ifndef __MEDIATEK_DVFSRC_H
9#define __MEDIATEK_DVFSRC_H
10
11enum mtk_dvfsrc_cmd {
12 MTK_DVFSRC_CMD_BW,
13 MTK_DVFSRC_CMD_HRT_BW,
14 MTK_DVFSRC_CMD_PEAK_BW,
15 MTK_DVFSRC_CMD_OPP,
16 MTK_DVFSRC_CMD_VCORE_LEVEL,
17 MTK_DVFSRC_CMD_VSCP_LEVEL,
18 MTK_DVFSRC_CMD_MAX,
19};
20
21#if IS_ENABLED(CONFIG_MTK_DVFSRC)
22
23int mtk_dvfsrc_send_request(const struct device *dev, u32 cmd, u64 data);
24int mtk_dvfsrc_query_info(const struct device *dev, u32 cmd, int *data);
25
26#else
27
28static inline int mtk_dvfsrc_send_request(const struct device *dev, u32 cmd, u64 data)
29{ return -ENODEV; }
30
31static inline int mtk_dvfsrc_query_info(const struct device *dev, u32 cmd, int *data)
32{ return -ENODEV; }
33
34#endif /* CONFIG_MTK_DVFSRC */
35
36#endif