xref: /OK3568_Linux_fs/kernel/include/media/rcar-fcp.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * rcar-fcp.h  --  R-Car Frame Compression Processor Driver
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2016 Renesas Electronics Corporation
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun #ifndef __MEDIA_RCAR_FCP_H__
10*4882a593Smuzhiyun #define __MEDIA_RCAR_FCP_H__
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun struct device_node;
13*4882a593Smuzhiyun struct rcar_fcp_device;
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
16*4882a593Smuzhiyun struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
17*4882a593Smuzhiyun void rcar_fcp_put(struct rcar_fcp_device *fcp);
18*4882a593Smuzhiyun struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
19*4882a593Smuzhiyun int rcar_fcp_enable(struct rcar_fcp_device *fcp);
20*4882a593Smuzhiyun void rcar_fcp_disable(struct rcar_fcp_device *fcp);
21*4882a593Smuzhiyun #else
rcar_fcp_get(const struct device_node * np)22*4882a593Smuzhiyun static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
23*4882a593Smuzhiyun {
24*4882a593Smuzhiyun 	return ERR_PTR(-ENOENT);
25*4882a593Smuzhiyun }
rcar_fcp_put(struct rcar_fcp_device * fcp)26*4882a593Smuzhiyun static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
rcar_fcp_get_device(struct rcar_fcp_device * fcp)27*4882a593Smuzhiyun static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
28*4882a593Smuzhiyun {
29*4882a593Smuzhiyun 	return NULL;
30*4882a593Smuzhiyun }
rcar_fcp_enable(struct rcar_fcp_device * fcp)31*4882a593Smuzhiyun static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
32*4882a593Smuzhiyun {
33*4882a593Smuzhiyun 	return 0;
34*4882a593Smuzhiyun }
rcar_fcp_disable(struct rcar_fcp_device * fcp)35*4882a593Smuzhiyun static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
36*4882a593Smuzhiyun #endif
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #endif /* __MEDIA_RCAR_FCP_H__ */
39