cam_compat.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_COMPAT_H_
  6. #define _CAM_COMPAT_H_
  7. #include <linux/version.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/component.h>
  10. #include "cam_csiphy_dev.h"
  11. #include "cam_cpastop_hw.h"
  12. #if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
  13. #include <linux/msm_ion.h>
  14. #include <linux/ion.h>
  15. #include <linux/qcom_scm.h>
  16. #else
  17. #include <linux/msm_ion.h>
  18. #include <linux/ion_kernel.h>
  19. #include <soc/qcom/scm.h>
  20. #endif
  21. struct cam_fw_alloc_info {
  22. struct device *fw_dev;
  23. void *fw_kva;
  24. uint64_t fw_hdl;
  25. };
  26. int cam_reserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
  27. void cam_unreserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
  28. void cam_cpastop_scm_write(struct cam_cpas_hw_errata_wa *errata_wa);
  29. int cam_ife_notify_safe_lut_scm(bool safe_trigger);
  30. int camera_component_match_add_drivers(struct device *master_dev,
  31. struct component_match **match_list);
  32. int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev,
  33. bool protect, int32_t offset);
  34. #endif /* _CAM_COMPAT_H_ */