icc-emi.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2021 MediaTek Inc.
  4. * Copyright (c) 2024 Collabora Ltd.
  5. * AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
  6. */
  7. #ifndef __DRIVERS_INTERCONNECT_MEDIATEK_ICC_EMI_H
  8. #define __DRIVERS_INTERCONNECT_MEDIATEK_ICC_EMI_H
  9. /**
  10. * struct mtk_icc_node - Mediatek EMI Interconnect Node
  11. * @name: The interconnect node name which is shown in debugfs
  12. * @ep: Type of this endpoint
  13. * @id: Unique node identifier
  14. * @sum_avg: Current sum aggregate value of all average bw requests in kBps
  15. * @max_peak: Current max aggregate value of all peak bw requests in kBps
  16. * @num_links: The total number of @links
  17. * @links: Array of @id linked to this node
  18. */
  19. struct mtk_icc_node {
  20. unsigned char *name;
  21. int ep;
  22. u16 id;
  23. u64 sum_avg;
  24. u64 max_peak;
  25. u16 num_links;
  26. u16 links[] __counted_by(num_links);
  27. };
  28. struct mtk_icc_desc {
  29. struct mtk_icc_node **nodes;
  30. size_t num_nodes;
  31. };
  32. int mtk_emi_icc_probe(struct platform_device *pdev);
  33. void mtk_emi_icc_remove(struct platform_device *pdev);
  34. #endif /* __DRIVERS_INTERCONNECT_MEDIATEK_ICC_EMI_H */