47 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Copyright (c) 2016 MediaTek Inc.4 * Author: Ming Hsiu Tsai <minghsiu.tsai@mediatek.com>5 */6 7#ifndef __MTK_MDP_COMP_H__8#define __MTK_MDP_COMP_H__9 10/**11 * enum mtk_mdp_comp_type - the MDP component12 * @MTK_MDP_RDMA: Read DMA13 * @MTK_MDP_RSZ: Riszer14 * @MTK_MDP_WDMA: Write DMA15 * @MTK_MDP_WROT: Write DMA with rotation16 */17enum mtk_mdp_comp_type {18 MTK_MDP_RDMA,19 MTK_MDP_RSZ,20 MTK_MDP_WDMA,21 MTK_MDP_WROT,22};23 24/**25 * struct mtk_mdp_comp - the MDP's function component data26 * @node: list node to track sibing MDP components27 * @dev_node: component device node28 * @clk: clocks required for component29 * @type: component type30 */31struct mtk_mdp_comp {32 struct list_head node;33 struct device_node *dev_node;34 struct clk *clk[2];35 enum mtk_mdp_comp_type type;36};37 38int mtk_mdp_comp_init(struct device *dev, struct device_node *node,39 struct mtk_mdp_comp *comp,40 enum mtk_mdp_comp_type comp_type);41void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);42void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp);43void mtk_mdp_comp_clock_off(struct device *dev, struct mtk_mdp_comp *comp);44 45 46#endif /* __MTK_MDP_COMP_H__ */47