bcm-voter.h 842 B

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