Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 1 | /* |
| 2 | * rcar-fcp.h -- R-Car Frame Compression Processor Driver |
| 3 | * |
| 4 | * Copyright (C) 2016 Renesas Electronics Corporation |
| 5 | * |
| 6 | * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com) |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | */ |
| 13 | #ifndef __MEDIA_RCAR_FCP_H__ |
| 14 | #define __MEDIA_RCAR_FCP_H__ |
| 15 | |
| 16 | struct device_node; |
| 17 | struct rcar_fcp_device; |
| 18 | |
| 19 | #if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP) |
| 20 | struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np); |
| 21 | void rcar_fcp_put(struct rcar_fcp_device *fcp); |
Laurent Pinchart | 0253354 | 2017-05-17 02:20:04 +0300 | [diff] [blame] | 22 | struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp); |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 23 | int rcar_fcp_enable(struct rcar_fcp_device *fcp); |
| 24 | void rcar_fcp_disable(struct rcar_fcp_device *fcp); |
| 25 | #else |
| 26 | static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np) |
| 27 | { |
| 28 | return ERR_PTR(-ENOENT); |
| 29 | } |
| 30 | static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { } |
Laurent Pinchart | 0253354 | 2017-05-17 02:20:04 +0300 | [diff] [blame] | 31 | static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp) |
| 32 | { |
| 33 | return NULL; |
| 34 | } |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 35 | static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp) |
| 36 | { |
Laurent Pinchart | fd44aa9 | 2016-08-17 09:57:37 -0300 | [diff] [blame] | 37 | return 0; |
Laurent Pinchart | 7b49235 | 2016-02-11 22:29:58 -0200 | [diff] [blame] | 38 | } |
| 39 | static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { } |
| 40 | #endif |
| 41 | |
| 42 | #endif /* __MEDIA_RCAR_FCP_H__ */ |