rcar-fcp.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. struct device_node;
  16. struct rcar_fcp_device;
  17. #if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
  18. struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
  19. void rcar_fcp_put(struct rcar_fcp_device *fcp);
  20. struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
  21. int rcar_fcp_enable(struct rcar_fcp_device *fcp);
  22. void rcar_fcp_disable(struct rcar_fcp_device *fcp);
  23. #else
  24. static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
  25. {
  26. return ERR_PTR(-ENOENT);
  27. }
  28. static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
  29. static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
  30. {
  31. return NULL;
  32. }
  33. static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
  34. {
  35. return 0;
  36. }
  37. static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
  38. #endif
  39. #endif /* __MEDIA_RCAR_FCP_H__ */