sh_mobile_csi2.h 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #include <linux/list.h>
  13. enum sh_csi2_phy {
  14. SH_CSI2_PHY_MAIN,
  15. SH_CSI2_PHY_SUB,
  16. };
  17. enum sh_csi2_type {
  18. SH_CSI2C,
  19. SH_CSI2I,
  20. };
  21. #define SH_CSI2_CRC (1 << 0)
  22. #define SH_CSI2_ECC (1 << 1)
  23. struct platform_device;
  24. struct sh_csi2_client_config {
  25. enum sh_csi2_phy phy;
  26. unsigned char lanes; /* bitmask[3:0] */
  27. unsigned char channel; /* 0..3 */
  28. struct platform_device *pdev; /* client platform device */
  29. const char *name; /* async matching: client name */
  30. };
  31. struct v4l2_device;
  32. struct sh_csi2_pdata {
  33. enum sh_csi2_type type;
  34. unsigned int flags;
  35. struct sh_csi2_client_config *clients;
  36. int num_clients;
  37. };
  38. #endif