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