Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / media / rcar-fcp.h
blob179240fb163bd2e7cc347e559f99bae943bf0e34
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * rcar-fcp.h -- R-Car Frame Compression Processor Driver
5 * Copyright (C) 2016 Renesas Electronics Corporation
7 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
8 */
9 #ifndef __MEDIA_RCAR_FCP_H__
10 #define __MEDIA_RCAR_FCP_H__
12 struct device_node;
13 struct rcar_fcp_device;
15 #if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
16 struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
17 void rcar_fcp_put(struct rcar_fcp_device *fcp);
18 struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
19 int rcar_fcp_enable(struct rcar_fcp_device *fcp);
20 void rcar_fcp_disable(struct rcar_fcp_device *fcp);
21 #else
22 static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
24 return ERR_PTR(-ENOENT);
26 static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
27 static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
29 return NULL;
31 static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
33 return 0;
35 static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
36 #endif
38 #endif /* __MEDIA_RCAR_FCP_H__ */