omap4iss.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef ARCH_ARM_PLAT_OMAP4_ISS_H
  2. #define ARCH_ARM_PLAT_OMAP4_ISS_H
  3. #include <linux/i2c.h>
  4. struct iss_device;
  5. enum iss_interface_type {
  6. ISS_INTERFACE_CSI2A_PHY1,
  7. ISS_INTERFACE_CSI2B_PHY2,
  8. };
  9. /**
  10. * struct iss_csiphy_lane: CSI2 lane position and polarity
  11. * @pos: position of the lane
  12. * @pol: polarity of the lane
  13. */
  14. struct iss_csiphy_lane {
  15. u8 pos;
  16. u8 pol;
  17. };
  18. #define ISS_CSIPHY1_NUM_DATA_LANES 4
  19. #define ISS_CSIPHY2_NUM_DATA_LANES 1
  20. /**
  21. * struct iss_csiphy_lanes_cfg - CSI2 lane configuration
  22. * @data: Configuration of one or two data lanes
  23. * @clk: Clock lane configuration
  24. */
  25. struct iss_csiphy_lanes_cfg {
  26. struct iss_csiphy_lane data[ISS_CSIPHY1_NUM_DATA_LANES];
  27. struct iss_csiphy_lane clk;
  28. };
  29. /**
  30. * struct iss_csi2_platform_data - CSI2 interface platform data
  31. * @crc: Enable the cyclic redundancy check
  32. * @vpclk_div: Video port output clock control
  33. */
  34. struct iss_csi2_platform_data {
  35. unsigned crc:1;
  36. unsigned vpclk_div:2;
  37. struct iss_csiphy_lanes_cfg lanecfg;
  38. };
  39. struct iss_subdev_i2c_board_info {
  40. struct i2c_board_info *board_info;
  41. int i2c_adapter_id;
  42. };
  43. struct iss_v4l2_subdevs_group {
  44. struct iss_subdev_i2c_board_info *subdevs;
  45. enum iss_interface_type interface;
  46. union {
  47. struct iss_csi2_platform_data csi2;
  48. } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */
  49. };
  50. struct iss_platform_data {
  51. struct iss_v4l2_subdevs_group *subdevs;
  52. void (*set_constraints)(struct iss_device *iss, bool enable);
  53. };
  54. #endif