blob: 9a5c5d992e04384fa75cce4e78161b9faf4ba074 [file] [log] [blame]
Caleb Connolly90ff5812024-07-15 12:08:02 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4 */
5
6#ifndef __SOC_QCOM_RPMH_H__
7#define __SOC_QCOM_RPMH_H__
8
9#include <soc/qcom/tcs.h>
10#include <linux/platform_device.h>
11
12
13#if IS_ENABLED(CONFIG_QCOM_RPMH)
14int rpmh_write(const struct device *dev, enum rpmh_state state,
15 const struct tcs_cmd *cmd, u32 n);
16
Caleb Connolly90ff5812024-07-15 12:08:02 +020017#else
18
19static inline int rpmh_write(const struct device *dev, enum rpmh_state state,
20 const struct tcs_cmd *cmd, u32 n)
21{ return -ENODEV; }
22
Caleb Connolly90ff5812024-07-15 12:08:02 +020023#endif /* CONFIG_QCOM_RPMH */
24
Caleb Connolly49deb542024-07-15 12:08:12 +020025/* u-boot: no multithreading */
26#define rpmh_write_async(dev, state, cmd, n) rpmh_write(dev, state, cmd, n)
27
Caleb Connolly90ff5812024-07-15 12:08:02 +020028#endif /* __SOC_QCOM_RPMH_H__ */