rcar-fcp.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  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)
  8. */
  9. #ifndef __MEDIA_RCAR_FCP_H__
  10. #define __MEDIA_RCAR_FCP_H__
  11. struct device_node;
  12. struct rcar_fcp_device;
  13. #if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
  14. struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
  15. void rcar_fcp_put(struct rcar_fcp_device *fcp);
  16. struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
  17. int rcar_fcp_enable(struct rcar_fcp_device *fcp);
  18. void rcar_fcp_disable(struct rcar_fcp_device *fcp);
  19. int rcar_fcp_soft_reset(struct rcar_fcp_device *fcp);
  20. #else
  21. static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
  22. {
  23. return ERR_PTR(-ENOENT);
  24. }
  25. static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
  26. static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
  27. {
  28. return NULL;
  29. }
  30. static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
  31. {
  32. return 0;
  33. }
  34. static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
  35. static inline int rcar_fcp_soft_reset(struct rcar_fcp_device *fcp)
  36. {
  37. return 0;
  38. }
  39. #endif
  40. #endif /* __MEDIA_RCAR_FCP_H__ */