camera_main.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef CAMERA_MAIN_H
  6. #define CAMERA_MAIN_H
  7. #include <linux/platform_device.h>
  8. #include <linux/i2c.h>
  9. #include <linux/component.h>
  10. extern struct platform_driver cam_sync_driver;
  11. extern struct platform_driver cam_smmu_driver;
  12. extern struct platform_driver cam_cpas_driver;
  13. extern struct platform_driver cam_cdm_intf_driver;
  14. extern struct platform_driver cam_hw_cdm_driver;
  15. #ifdef CONFIG_SPECTRA_ISP
  16. extern struct platform_driver cam_ife_csid_driver;
  17. extern struct platform_driver cam_ife_csid_lite_driver;
  18. extern struct platform_driver cam_vfe_driver;
  19. extern struct platform_driver cam_sfe_driver;
  20. extern struct platform_driver isp_driver;
  21. #endif
  22. #ifdef CONFIG_SPECTRA_TFE
  23. extern struct platform_driver cam_csid_ppi100_driver;
  24. extern struct platform_driver cam_tfe_driver;
  25. extern struct platform_driver cam_tfe_csid_driver;
  26. #endif
  27. #ifdef CONFIG_SPECTRA_SENSOR
  28. extern struct platform_driver cam_res_mgr_driver;
  29. extern struct platform_driver cci_driver;
  30. extern struct platform_driver csiphy_driver;
  31. extern struct platform_driver cam_actuator_platform_driver;
  32. extern struct platform_driver cam_sensor_platform_driver;
  33. extern struct platform_driver cam_eeprom_platform_driver;
  34. extern struct platform_driver cam_ois_platform_driver;
  35. extern struct platform_driver cam_tpg_driver;
  36. extern struct i2c_driver cam_actuator_i2c_driver;
  37. extern struct i2c_driver cam_flash_i2c_driver;
  38. extern struct i2c_driver cam_ois_i2c_driver;
  39. extern struct i2c_driver cam_eeprom_i2c_driver;
  40. extern struct i2c_driver cam_sensor_i2c_driver;
  41. #if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
  42. IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
  43. extern struct platform_driver cam_flash_platform_driver;
  44. #endif
  45. #endif
  46. #ifdef CONFIG_SPECTRA_ICP
  47. extern struct platform_driver cam_a5_driver;
  48. extern struct platform_driver cam_lx7_driver;
  49. extern struct platform_driver cam_ipe_driver;
  50. extern struct platform_driver cam_bps_driver;
  51. extern struct platform_driver cam_icp_driver;
  52. #endif
  53. #ifdef CONFIG_SPECTRA_OPE
  54. extern struct platform_driver cam_ope_driver;
  55. extern struct platform_driver cam_ope_subdev_driver;
  56. #endif
  57. #ifdef CONFIG_SPECTRA_CRE
  58. extern struct platform_driver cam_cre_driver;
  59. extern struct platform_driver cam_cre_subdev_driver;
  60. #endif
  61. #ifdef CONFIG_SPECTRA_JPEG
  62. extern struct platform_driver cam_jpeg_enc_driver;
  63. extern struct platform_driver cam_jpeg_dma_driver;
  64. extern struct platform_driver jpeg_driver;
  65. #endif
  66. #ifdef CONFIG_SPECTRA_FD
  67. extern struct platform_driver cam_fd_hw_driver;
  68. extern struct platform_driver cam_fd_driver;
  69. #endif
  70. #ifdef CONFIG_SPECTRA_LRME
  71. extern struct platform_driver cam_lrme_hw_driver;
  72. extern struct platform_driver cam_lrme_driver;
  73. #endif
  74. #ifdef CONFIG_SPECTRA_CUSTOM
  75. extern struct platform_driver cam_custom_hw_sub_mod_driver;
  76. extern struct platform_driver cam_custom_csid_driver;
  77. extern struct platform_driver custom_driver;
  78. #endif
  79. /*
  80. * Drivers to be bound by component framework in this order with
  81. * CRM as master
  82. */
  83. static struct platform_driver *const cam_component_platform_drivers[] = {
  84. /* BASE */
  85. &cam_sync_driver,
  86. &cam_smmu_driver,
  87. &cam_cpas_driver,
  88. &cam_cdm_intf_driver,
  89. &cam_hw_cdm_driver,
  90. #ifdef CONFIG_SPECTRA_TFE
  91. &cam_csid_ppi100_driver,
  92. &cam_tfe_driver,
  93. &cam_tfe_csid_driver,
  94. #endif
  95. #ifdef CONFIG_SPECTRA_ISP
  96. &cam_ife_csid_driver,
  97. &cam_ife_csid_lite_driver,
  98. &cam_vfe_driver,
  99. &cam_sfe_driver,
  100. &isp_driver,
  101. #endif
  102. #ifdef CONFIG_SPECTRA_SENSOR
  103. &cam_res_mgr_driver,
  104. &cci_driver,
  105. &csiphy_driver,
  106. &cam_actuator_platform_driver,
  107. &cam_sensor_platform_driver,
  108. &cam_eeprom_platform_driver,
  109. &cam_ois_platform_driver,
  110. &cam_tpg_driver,
  111. #if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
  112. IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
  113. &cam_flash_platform_driver,
  114. #endif
  115. #endif
  116. #ifdef CONFIG_SPECTRA_ICP
  117. &cam_a5_driver,
  118. &cam_lx7_driver,
  119. &cam_ipe_driver,
  120. &cam_bps_driver,
  121. &cam_icp_driver,
  122. #endif
  123. #ifdef CONFIG_SPECTRA_OPE
  124. &cam_ope_driver,
  125. &cam_ope_subdev_driver,
  126. #endif
  127. #ifdef CONFIG_SPECTRA_JPEG
  128. &cam_jpeg_enc_driver,
  129. &cam_jpeg_dma_driver,
  130. &jpeg_driver,
  131. #endif
  132. #ifdef CONFIG_SPECTRA_CRE
  133. &cam_cre_driver,
  134. &cam_cre_subdev_driver,
  135. #endif
  136. #ifdef CONFIG_SPECTRA_FD
  137. &cam_fd_hw_driver,
  138. &cam_fd_driver,
  139. #endif
  140. #ifdef CONFIG_SPECTRA_LRME
  141. &cam_lrme_hw_driver,
  142. &cam_lrme_driver,
  143. #endif
  144. #ifdef CONFIG_SPECTRA_CUSTOM
  145. &cam_custom_hw_sub_mod_driver,
  146. &cam_custom_csid_driver,
  147. &custom_driver,
  148. #endif
  149. };
  150. static struct i2c_driver *const cam_component_i2c_drivers[] = {
  151. #ifdef CONFIG_SPECTRA_SENSOR
  152. &cam_actuator_i2c_driver,
  153. &cam_flash_i2c_driver,
  154. &cam_ois_i2c_driver,
  155. &cam_eeprom_i2c_driver,
  156. &cam_sensor_i2c_driver,
  157. #endif
  158. };
  159. #endif /* CAMERA_MAIN_H */