sh_mobile_csi2.h 922 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Driver header for the SH-Mobile MIPI CSI-2 unit
  3. *
  4. * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef SH_MIPI_CSI
  11. #define SH_MIPI_CSI
  12. enum sh_csi2_phy {
  13. SH_CSI2_PHY_MAIN,
  14. SH_CSI2_PHY_SUB,
  15. };
  16. enum sh_csi2_type {
  17. SH_CSI2C,
  18. SH_CSI2I,
  19. };
  20. #define SH_CSI2_CRC (1 << 0)
  21. #define SH_CSI2_ECC (1 << 1)
  22. struct platform_device;
  23. struct sh_csi2_client_config {
  24. enum sh_csi2_phy phy;
  25. unsigned char lanes; /* bitmask[3:0] */
  26. unsigned char channel; /* 0..3 */
  27. struct platform_device *pdev; /* client platform device */
  28. };
  29. struct sh_csi2_pdata {
  30. enum sh_csi2_type type;
  31. unsigned int flags;
  32. struct sh_csi2_client_config *clients;
  33. int num_clients;
  34. };
  35. struct device;
  36. struct v4l2_device;
  37. #endif