1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * rcar_du_encoder.h  --  R-Car Display Unit Encoder
4  *
5  * Copyright (C) 2013-2014 Renesas Electronics Corporation
6  *
7  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
8  */
9 
10 #ifndef __RCAR_DU_ENCODER_H__
11 #define __RCAR_DU_ENCODER_H__
12 
13 #include <drm/drm_encoder.h>
14 
15 struct rcar_du_device;
16 
17 struct rcar_du_encoder {
18 	struct drm_encoder base;
19 	enum rcar_du_output output;
20 };
21 
22 #define to_rcar_encoder(e) \
23 	container_of(e, struct rcar_du_encoder, base)
24 
25 #define rcar_encoder_to_drm_encoder(e)	(&(e)->base)
26 
27 int rcar_du_encoder_init(struct rcar_du_device *rcdu,
28 			 enum rcar_du_output output,
29 			 struct device_node *enc_node);
30 
31 #endif /* __RCAR_DU_ENCODER_H__ */
32