hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2016 MediaTek Inc.
 * Author: Ming Hsiu Tsai <minghsiu.tsai@mediatek.com>
 */
 
#ifndef __MTK_MDP_COMP_H__
#define __MTK_MDP_COMP_H__
 
/**
 * enum mtk_mdp_comp_type - the MDP component
 * @MTK_MDP_RDMA:    Read DMA
 * @MTK_MDP_RSZ:    Riszer
 * @MTK_MDP_WDMA:    Write DMA
 * @MTK_MDP_WROT:    Write DMA with rotation
 */
enum mtk_mdp_comp_type {
   MTK_MDP_RDMA,
   MTK_MDP_RSZ,
   MTK_MDP_WDMA,
   MTK_MDP_WROT,
   MTK_MDP_COMP_TYPE_MAX,
};
 
/**
 * struct mtk_mdp_comp - the MDP's function component data
 * @node:    list node to track sibing MDP components
 * @dev_node:    component device node
 * @clk:    clocks required for component
 * @larb_dev:    SMI device required for component
 * @type:    component type
 */
struct mtk_mdp_comp {
   struct list_head    node;
   struct device_node    *dev_node;
   struct clk        *clk[2];
   struct device        *larb_dev;
   enum mtk_mdp_comp_type    type;
};
 
int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
             struct mtk_mdp_comp *comp,
             enum mtk_mdp_comp_type comp_type);
void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);
void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp);
void mtk_mdp_comp_clock_off(struct device *dev, struct mtk_mdp_comp *comp);
 
 
#endif /* __MTK_MDP_COMP_H__ */