Message ID | 20200218112752.3910410-5-jacopo@jmondi.org |
---|---|
State | Superseded, archived |
Delegated to: | Jacopo Mondi |
Headers | show |
Series |
|
Related | show |
Hi Jacopo, Thanks for your work. On 2020-02-18 12:27:49 +0100, Jacopo Mondi wrote: > Add OV5670CameraSensor class to handle Omnivision OV5670 image sensor > and register it to the camera sensor factory. > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> > --- > src/libcamera/meson.build | 1 + > src/libcamera/sensor/meson.build | 3 +++ > src/libcamera/sensor/ov5670.cpp | 39 ++++++++++++++++++++++++++++++++ > 3 files changed, 43 insertions(+) > create mode 100644 src/libcamera/sensor/meson.build > create mode 100644 src/libcamera/sensor/ov5670.cpp > > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build > index ecc5b5fe4023..7dd7358b174e 100644 > --- a/src/libcamera/meson.build > +++ b/src/libcamera/meson.build > @@ -58,6 +58,7 @@ includes = [ > > subdir('pipeline') > subdir('proxy') > +subdir('sensor') > > libudev = dependency('libudev', required : false) > > diff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build > new file mode 100644 > index 000000000000..7af70370cf5c > --- /dev/null > +++ b/src/libcamera/sensor/meson.build > @@ -0,0 +1,3 @@ > +libcamera_sources += files([ > + 'ov5670.cpp', > +]) > diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp > new file mode 100644 > index 000000000000..407a0d2967ae > --- /dev/null > +++ b/src/libcamera/sensor/ov5670.cpp > @@ -0,0 +1,39 @@ > +/* SPDX-License-Identifier: LGPL-2.1-or-later */ > +/* > + * Copyright (C) 2020, Google Inc. > + * > + * ov5670.cpp - OV5670 camera sensor > + */ > + > +#include "camera_sensor.h" > + > +/** > + * \file ov5670.cpp > + * \brief Omnivision OV5670 image sensor > + */ > + > +namespace libcamera { > + > +class OV5670 final : public CameraSensor > +{ > +public: > + OV5670(const MediaEntity *entity); > +}; > + > +/** > + * \class OV5670 > + * \brief Camera sensor class for Omnivision OV5670 image sensor > + */ > + > +/** > + * \brief Construct the ov5670 sensor class > + * \param[in] entity The media entity representing the sensor > + */ Out of curiosity, do you think we shall mandate this type of documentation for sensor drivers or shall we treat them like the pipeline handlers where documentation is more optional? At least for now. With or with out this addressed for this change, Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > +OV5670::OV5670(const MediaEntity *entity) > + : CameraSensor(entity) > +{ > +} > + > +REGISTER_CAMERA_SENSOR(OV5670, "ov5670"); > + > +}; /* namespace libcamera */ > -- > 2.25.0 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index ecc5b5fe4023..7dd7358b174e 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -58,6 +58,7 @@ includes = [ subdir('pipeline') subdir('proxy') +subdir('sensor') libudev = dependency('libudev', required : false) diff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build new file mode 100644 index 000000000000..7af70370cf5c --- /dev/null +++ b/src/libcamera/sensor/meson.build @@ -0,0 +1,3 @@ +libcamera_sources += files([ + 'ov5670.cpp', +]) diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp new file mode 100644 index 000000000000..407a0d2967ae --- /dev/null +++ b/src/libcamera/sensor/ov5670.cpp @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * ov5670.cpp - OV5670 camera sensor + */ + +#include "camera_sensor.h" + +/** + * \file ov5670.cpp + * \brief Omnivision OV5670 image sensor + */ + +namespace libcamera { + +class OV5670 final : public CameraSensor +{ +public: + OV5670(const MediaEntity *entity); +}; + +/** + * \class OV5670 + * \brief Camera sensor class for Omnivision OV5670 image sensor + */ + +/** + * \brief Construct the ov5670 sensor class + * \param[in] entity The media entity representing the sensor + */ +OV5670::OV5670(const MediaEntity *entity) + : CameraSensor(entity) +{ +} + +REGISTER_CAMERA_SENSOR(OV5670, "ov5670"); + +}; /* namespace libcamera */
Add OV5670CameraSensor class to handle Omnivision OV5670 image sensor and register it to the camera sensor factory. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- src/libcamera/meson.build | 1 + src/libcamera/sensor/meson.build | 3 +++ src/libcamera/sensor/ov5670.cpp | 39 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 src/libcamera/sensor/meson.build create mode 100644 src/libcamera/sensor/ov5670.cpp