WIP FPC-III support
[linux/fpc-iii.git] / drivers / interconnect / qcom / bcm-voter.h
blob0f64c0bab2c0eee2ca0c074fde55fb2d283da1fa
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
4 */
6 #ifndef __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
7 #define __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
9 #include <soc/qcom/cmd-db.h>
10 #include <soc/qcom/rpmh.h>
11 #include <soc/qcom/tcs.h>
13 #include "icc-rpmh.h"
15 #define DEFINE_QBCM(_name, _bcmname, _keepalive, ...) \
16 static struct qcom_icc_bcm _name = { \
17 .name = _bcmname, \
18 .keepalive = _keepalive, \
19 .num_nodes = ARRAY_SIZE(((struct qcom_icc_node *[]){ __VA_ARGS__ })), \
20 .nodes = { __VA_ARGS__ }, \
23 struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name);
24 void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm);
25 int qcom_icc_bcm_voter_commit(struct bcm_voter *voter);
27 #endif