vsp1_uif.h 715 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vsp1_uif.h -- R-Car VSP1 User Logic Interface
  4. *
  5. * Copyright (C) 2017-2018 Laurent Pinchart
  6. *
  7. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  8. */
  9. #ifndef __VSP1_UIF_H__
  10. #define __VSP1_UIF_H__
  11. #include "vsp1_entity.h"
  12. struct vsp1_device;
  13. #define UIF_PAD_SINK 0
  14. #define UIF_PAD_SOURCE 1
  15. struct vsp1_uif {
  16. struct vsp1_entity entity;
  17. bool m3w_quirk;
  18. };
  19. static inline struct vsp1_uif *to_uif(struct v4l2_subdev *subdev)
  20. {
  21. return container_of(subdev, struct vsp1_uif, entity.subdev);
  22. }
  23. struct vsp1_uif *vsp1_uif_create(struct vsp1_device *vsp1, unsigned int index);
  24. u32 vsp1_uif_get_crc(struct vsp1_uif *uif);
  25. #endif /* __VSP1_UIF_H__ */