Kuninori Morimoto | 1de2e6b | 2018-08-05 23:17:01 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 2 | /* |
| 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 Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 8 | */ |
| 9 | #ifndef __MEDIA_RCAR_FCP_H__ |
| 10 | #define __MEDIA_RCAR_FCP_H__ |
| 11 | |
| 12 | struct device_node; |
| 13 | struct rcar_fcp_device; |
| 14 | |
| 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); |
Laurent Pinchart | 0253354 | 2017-05-17 02:20:04 +0300 | [diff] [blame] | 18 | struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp); |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 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) |
| 23 | { |
| 24 | return ERR_PTR(-ENOENT); |
| 25 | } |
| 26 | static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { } |
Laurent Pinchart | 0253354 | 2017-05-17 02:20:04 +0300 | [diff] [blame] | 27 | static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp) |
| 28 | { |
| 29 | return NULL; |
| 30 | } |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 31 | static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp) |
| 32 | { |
Laurent Pinchart | fd44aa9 | 2016-08-17 09:57:37 -0300 | [diff] [blame] | 33 | return 0; |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 34 | } |
| 35 | static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { } |
| 36 | #endif |
| 37 | |
| 38 | #endif /* __MEDIA_RCAR_FCP_H__ */ |