cam_jpeg_dev.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_JPEG_DEV_H_
  6. #define _CAM_JPEG_DEV_H_
  7. #include "cam_subdev.h"
  8. #include "cam_hw_mgr_intf.h"
  9. #include "cam_context.h"
  10. #include "cam_jpeg_context.h"
  11. /**
  12. * struct cam_jpeg_dev - Camera JPEG V4l2 device node
  13. *
  14. * @sd: Commone camera subdevice node
  15. * @node: Pointer to jpeg subdevice
  16. * @ctx: JPEG base context storage
  17. * @ctx_jpeg: JPEG private context storage
  18. * @jpeg_mutex: Jpeg dev mutex
  19. * @open_cnt: Open device count
  20. */
  21. struct cam_jpeg_dev {
  22. struct cam_subdev sd;
  23. struct cam_node *node;
  24. struct cam_context ctx[CAM_JPEG_CTX_MAX];
  25. struct cam_jpeg_context ctx_jpeg[CAM_JPEG_CTX_MAX];
  26. struct mutex jpeg_mutex;
  27. int32_t open_cnt;
  28. };
  29. /**
  30. * @brief : API to register JPEG dev to platform framework.
  31. * @return struct platform_device pointer on on success, or ERR_PTR() on error.
  32. */
  33. int cam_jpeg_dev_init_module(void);
  34. /**
  35. * @brief : API to remove JPEG dev from platform framework.
  36. */
  37. void cam_jpeg_dev_exit_module(void);
  38. #endif /* __CAM_JPEG_DEV_H__ */