cam_isp_dev.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_ISP_DEV_H_
  6. #define _CAM_ISP_DEV_H_
  7. #include "cam_subdev.h"
  8. #include "cam_hw_mgr_intf.h"
  9. #include "cam_context.h"
  10. #include "cam_isp_context.h"
  11. /**
  12. * struct cam_isp_dev - Camera ISP V4l2 device node
  13. *
  14. * @sd: Commone camera subdevice node
  15. * @ctx: Isp base context storage
  16. * @ctx_isp: Isp private context storage
  17. * @isp_mutex: ISP dev mutex
  18. * @open_cnt: Open device count
  19. * @isp_device_type ISP device type
  20. * @max_context maximum contexts for TFE is 4 and for IFE is 8
  21. */
  22. struct cam_isp_dev {
  23. struct cam_subdev sd;
  24. struct cam_context *ctx;
  25. struct cam_isp_context *ctx_isp;
  26. struct mutex isp_mutex;
  27. int32_t open_cnt;
  28. uint32_t isp_device_type;
  29. int32_t max_context;
  30. };
  31. /**
  32. * @brief : API to register ISP Dev to platform framework.
  33. * @return struct platform_device pointer on on success, or ERR_PTR() on error.
  34. */
  35. int cam_isp_dev_init_module(void);
  36. /**
  37. * @brief : API to remove ISP Dev from platform framework.
  38. */
  39. void cam_isp_dev_exit_module(void);
  40. #endif /* __CAM_ISP_DEV_H__ */