Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
0004  */
0005 
0006 #ifndef __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
0007 #define __DRIVERS_INTERCONNECT_QCOM_BCM_VOTER_H__
0008 
0009 #include <soc/qcom/cmd-db.h>
0010 #include <soc/qcom/rpmh.h>
0011 #include <soc/qcom/tcs.h>
0012 
0013 #include "icc-rpmh.h"
0014 
0015 #define DEFINE_QBCM(_name, _bcmname, _keepalive, ...)                  \
0016 static struct qcom_icc_bcm _name = {                           \
0017     .name = _bcmname,                              \
0018     .keepalive = _keepalive,                           \
0019     .num_nodes = ARRAY_SIZE(((struct qcom_icc_node *[]){ __VA_ARGS__ })),  \
0020     .nodes = { __VA_ARGS__ },                          \
0021 }
0022 
0023 struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name);
0024 void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm);
0025 int qcom_icc_bcm_voter_commit(struct bcm_voter *voter);
0026 
0027 #endif