linux/drivers/media/platform/mtk-mdp/mtk_mdp_comp.h
Thomas Gleixner 1802d0beec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 655 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:41 -07:00

65 lines
1.6 KiB
C

/* 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,
};
enum mtk_mdp_comp_id {
MTK_MDP_COMP_RDMA0,
MTK_MDP_COMP_RDMA1,
MTK_MDP_COMP_RSZ0,
MTK_MDP_COMP_RSZ1,
MTK_MDP_COMP_RSZ2,
MTK_MDP_COMP_WDMA,
MTK_MDP_COMP_WROT0,
MTK_MDP_COMP_WROT1,
MTK_MDP_COMP_ID_MAX,
};
/**
* struct mtk_mdp_comp - the MDP's function component data
* @dev_node: component device node
* @clk: clocks required for component
* @regs: Mapped address of component registers.
* @larb_dev: SMI device required for component
* @type: component type
* @id: component ID
*/
struct mtk_mdp_comp {
struct device_node *dev_node;
struct clk *clk[2];
void __iomem *regs;
struct device *larb_dev;
enum mtk_mdp_comp_type type;
enum mtk_mdp_comp_id id;
};
int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
struct mtk_mdp_comp *comp, enum mtk_mdp_comp_id comp_id);
void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);
int mtk_mdp_comp_get_id(struct device *dev, struct device_node *node,
enum mtk_mdp_comp_type comp_type);
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__ */