^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (c) 2020, The Linux Foundation. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <soc/qcom/cmd-db.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <soc/qcom/rpmh.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <soc/qcom/tcs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include "icc-rpmh.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define DEFINE_QBCM(_name, _bcmname, _keepalive, ...) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) static struct qcom_icc_bcm _name = { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) .name = _bcmname, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) .keepalive = _keepalive, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) .num_nodes = ARRAY_SIZE(((struct qcom_icc_node *[]){ __VA_ARGS__ })), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) .nodes = { __VA_ARGS__ }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) int qcom_icc_bcm_voter_commit(struct bcm_voter *voter);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #endif