camera_main.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, 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/component.h>
  9. extern struct platform_driver cam_sync_driver;
  10. extern struct platform_driver cam_smmu_driver;
  11. extern struct platform_driver cam_cpas_driver;
  12. extern struct platform_driver cam_cdm_intf_driver;
  13. extern struct platform_driver cam_hw_cdm_driver;
  14. #ifdef CONFIG_SPECTRA_ISP
  15. extern struct platform_driver cam_top_tpg_driver;
  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. #ifdef CONFIG_SPECTRA_SFE
  20. extern struct platform_driver cam_sfe_driver;
  21. #endif
  22. extern struct platform_driver isp_driver;
  23. #endif
  24. #ifdef CONFIG_SPECTRA_TFE
  25. extern struct platform_driver cam_csid_ppi100_driver;
  26. extern struct platform_driver cam_tfe_driver;
  27. extern struct platform_driver cam_tfe_csid530_driver;
  28. #endif
  29. #ifdef CONFIG_SPECTRA_SENSOR
  30. extern struct platform_driver cam_res_mgr_driver;
  31. extern struct platform_driver cci_driver;
  32. extern struct platform_driver csiphy_driver;
  33. extern struct platform_driver cam_actuator_platform_driver;
  34. extern struct platform_driver cam_sensor_platform_driver;
  35. extern struct platform_driver cam_eeprom_platform_driver;
  36. extern struct platform_driver cam_ois_platform_driver;
  37. #if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
  38. IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
  39. extern struct platform_driver cam_flash_platform_driver;
  40. #endif
  41. #endif
  42. #ifdef CONFIG_SPECTRA_ICP
  43. extern struct platform_driver cam_a5_driver;
  44. extern struct platform_driver cam_ipe_driver;
  45. extern struct platform_driver cam_bps_driver;
  46. extern struct platform_driver cam_icp_driver;
  47. #endif
  48. #ifdef CONFIG_SPECTRA_OPE
  49. extern struct platform_driver cam_ope_driver;
  50. extern struct platform_driver cam_ope_subdev_driver;
  51. #endif
  52. #ifdef CONFIG_SPECTRA_JPEG
  53. extern struct platform_driver cam_jpeg_enc_driver;
  54. extern struct platform_driver cam_jpeg_dma_driver;
  55. extern struct platform_driver jpeg_driver;
  56. #endif
  57. #ifdef CONFIG_SPECTRA_FD
  58. extern struct platform_driver cam_fd_hw_driver;
  59. extern struct platform_driver cam_fd_driver;
  60. #endif
  61. #ifdef CONFIG_SPECTRA_LRME
  62. extern struct platform_driver cam_lrme_hw_driver;
  63. extern struct platform_driver cam_lrme_driver;
  64. #endif
  65. #ifdef CONFIG_SPECTRA_CUSTOM
  66. extern struct platform_driver cam_custom_hw_sub_mod_driver;
  67. extern struct platform_driver cam_custom_csid_driver;
  68. extern struct platform_driver custom_driver;
  69. #endif
  70. /*
  71. * Drivers to be bound by component framework in this order with
  72. * CRM as master
  73. */
  74. static struct platform_driver *const cam_component_drivers[] = {
  75. /* BASE */
  76. &cam_sync_driver,
  77. &cam_smmu_driver,
  78. &cam_cpas_driver,
  79. &cam_cdm_intf_driver,
  80. &cam_hw_cdm_driver,
  81. #ifdef CONFIG_SPECTRA_TFE
  82. &cam_csid_ppi100_driver,
  83. &cam_tfe_driver,
  84. &cam_tfe_csid530_driver,
  85. #endif
  86. #ifdef CONFIG_SPECTRA_ISP
  87. &cam_top_tpg_driver,
  88. &cam_ife_csid_driver,
  89. &cam_ife_csid_lite_driver,
  90. &cam_vfe_driver,
  91. #ifdef CONFIG_SPECTRA_SFE
  92. &cam_sfe_driver,
  93. #endif
  94. &isp_driver,
  95. #endif
  96. #ifdef CONFIG_SPECTRA_SENSOR
  97. &cam_res_mgr_driver,
  98. &cci_driver,
  99. &csiphy_driver,
  100. &cam_actuator_platform_driver,
  101. &cam_sensor_platform_driver,
  102. &cam_eeprom_platform_driver,
  103. &cam_ois_platform_driver,
  104. #if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
  105. IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
  106. &cam_flash_platform_driver,
  107. #endif
  108. #endif
  109. #ifdef CONFIG_SPECTRA_ICP
  110. &cam_a5_driver,
  111. &cam_ipe_driver,
  112. &cam_bps_driver,
  113. &cam_icp_driver,
  114. #endif
  115. #ifdef CONFIG_SPECTRA_OPE
  116. &cam_ope_driver,
  117. &cam_ope_subdev_driver,
  118. #endif
  119. #ifdef CONFIG_SPECTRA_JPEG
  120. &cam_jpeg_enc_driver,
  121. &cam_jpeg_dma_driver,
  122. &jpeg_driver,
  123. #endif
  124. #ifdef CONFIG_SPECTRA_FD
  125. &cam_fd_hw_driver,
  126. &cam_fd_driver,
  127. #endif
  128. #ifdef CONFIG_SPECTRA_LRME
  129. &cam_lrme_hw_driver,
  130. &cam_lrme_driver,
  131. #endif
  132. #ifdef CONFIG_SPECTRA_CUSTOM
  133. &cam_custom_hw_sub_mod_driver,
  134. &cam_custom_csid_driver,
  135. &custom_driver,
  136. #endif
  137. };
  138. #endif /* CAMERA_MAIN_H */