rcar-fcp.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. int rcar_fcp_enable(struct rcar_fcp_device *fcp);
  21. void rcar_fcp_disable(struct rcar_fcp_device *fcp);
  22. #else
  23. static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
  24. {
  25. return ERR_PTR(-ENOENT);
  26. }
  27. static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
  28. static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
  29. {
  30. return 0;
  31. }
  32. static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
  33. #endif
  34. #endif /* __MEDIA_RCAR_FCP_H__ */