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