[libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add dev() operation
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jun 3 13:31:02 CEST 2019
Hi Jacopo,
Thank you for the patch.
On Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:
> Add dev() operation to the CameraSensor class to access the
> V4L2Subdevice backing the camera sensor.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> src/libcamera/camera_sensor.cpp | 6 ++++++
> src/libcamera/include/camera_sensor.h | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
> index 2b9d8fa593c1..8cbef8bccbef 100644
> --- a/src/libcamera/camera_sensor.cpp
> +++ b/src/libcamera/camera_sensor.cpp
> @@ -130,6 +130,12 @@ int CameraSensor::init()
> * \return The sensor media entity
> */
>
> +/**
> + * \fn CameraSensor::dev()
Shouldn't this be called device() ? What if the camera sensor is exposed
through multiple subdevs ?
> + * \brief Retrieve the sensor V4L2 subdevice
> + * \return The sensor V4L2 subdevice
> + */
> +
> /**
> * \fn CameraSensor::mbusCodes()
> * \brief Retrieve the media bus codes supported by the camera sensor
> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h
> index b823480241a7..6cdf833a27bf 100644
> --- a/src/libcamera/include/camera_sensor.h
> +++ b/src/libcamera/include/camera_sensor.h
> @@ -33,6 +33,7 @@ public:
> int init();
>
> const MediaEntity *entity() const { return entity_; }
> + V4L2Subdevice *dev() const { return subdev_; }
> const std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }
> const std::vector<Size> &sizes() const { return sizes_; }
> const Size &resolution() const;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list