mipi-csis.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
  3. *
  4. * S5P series MIPI CSI slave device support
  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 __PLAT_SAMSUNG_MIPI_CSIS_H_
  11. #define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__
  12. /**
  13. * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
  14. * @clk_rate: bus clock frequency
  15. * @lanes: number of data lanes used
  16. * @alignment: data alignment in bits
  17. * @hs_settle: HS-RX settle time
  18. * @fixed_phy_vdd: false to enable external D-PHY regulator management in the
  19. * driver or true in case this regulator has no enable function
  20. * @phy_enable: pointer to a callback controlling D-PHY enable/reset
  21. */
  22. struct s5p_platform_mipi_csis {
  23. unsigned long clk_rate;
  24. u8 lanes;
  25. u8 alignment;
  26. u8 hs_settle;
  27. bool fixed_phy_vdd;
  28. int (*phy_enable)(struct platform_device *pdev, bool on);
  29. };
  30. /**
  31. * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control
  32. * @id: MIPI-CSIS harware instance index (0...1)
  33. * @on: true to enable D-PHY and deassert its reset
  34. * false to disable D-PHY
  35. * @return: 0 on success, or negative error code on failure
  36. */
  37. int s5p_csis_phy_enable(int id, bool on);
  38. #endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */