blob: 179240fb163bd2e7cc347e559f99bae943bf0e34 [file] [log] [blame]
Kuninori Morimoto1de2e6b2018-08-05 23:17:01 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Laurent Pinchart7b492352016-02-11 22:29:58 -02002/*
3 * rcar-fcp.h -- R-Car Frame Compression Processor Driver
4 *
5 * Copyright (C) 2016 Renesas Electronics Corporation
6 *
7 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
Laurent Pinchart7b492352016-02-11 22:29:58 -02008 */
9#ifndef __MEDIA_RCAR_FCP_H__
10#define __MEDIA_RCAR_FCP_H__
11
12struct device_node;
13struct rcar_fcp_device;
14
15#if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
16struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
17void rcar_fcp_put(struct rcar_fcp_device *fcp);
Laurent Pinchart02533542017-05-17 02:20:04 +030018struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
Laurent Pinchart7b492352016-02-11 22:29:58 -020019int rcar_fcp_enable(struct rcar_fcp_device *fcp);
20void rcar_fcp_disable(struct rcar_fcp_device *fcp);
21#else
22static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
23{
24 return ERR_PTR(-ENOENT);
25}
26static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
Laurent Pinchart02533542017-05-17 02:20:04 +030027static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
28{
29 return NULL;
30}
Laurent Pinchart7b492352016-02-11 22:29:58 -020031static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
32{
Laurent Pinchartfd44aa92016-08-17 09:57:37 -030033 return 0;
Laurent Pinchart7b492352016-02-11 22:29:58 -020034}
35static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
36#endif
37
38#endif /* __MEDIA_RCAR_FCP_H__ */