cam_custom_dev.h 985 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0-only
  2. *
  3. * Copyright (c) 2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_CUSTOM_DEV_H_
  6. #define _CAM_CUSTOM_DEV_H_
  7. #include "cam_subdev.h"
  8. #include "cam_hw_mgr_intf.h"
  9. #include "cam_custom_hw_mgr.h"
  10. #include "cam_context.h"
  11. #include "cam_custom_context.h"
  12. #define CAM_CUSTOM_HW_MAX_INSTANCES 3
  13. /**
  14. * struct cam_custom_dev - Camera Custom V4l2 device node
  15. *
  16. * @sd: Common camera subdevice node
  17. * @ctx: Custom base context storage
  18. * @ctx_custom: Custom private context storage
  19. * @custom_dev_mutex: Custom dev mutex
  20. * @open_cnt: Open device count
  21. */
  22. struct cam_custom_dev {
  23. struct cam_subdev sd;
  24. struct cam_context ctx[CAM_CUSTOM_HW_MAX_INSTANCES];
  25. struct cam_custom_context ctx_custom[CAM_CUSTOM_HW_MAX_INSTANCES];
  26. struct mutex custom_dev_mutex;
  27. int32_t open_cnt;
  28. };
  29. #endif /* _CAM_CUSTOM_DEV_H_ */