[libcamera-devel,v2] libcamera: device_enumerator: extend documentation of DeviceMatch

Message ID 20190120140435.23252-1-niklas.soderlund@ragnatech.se
State Accepted
Headers show
Series
  • [libcamera-devel,v2] libcamera: device_enumerator: extend documentation of DeviceMatch
Related show

Commit Message

Niklas Söderlund Jan. 20, 2019, 2:04 p.m. UTC
Extend the document of the intended usage of DeviceMatch need for
information to correctly function to find a uniquely identifiable media
device.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
* Changes since v1
- Rephrased most of it after review comments from Laurent, Thanks!

 src/libcamera/device_enumerator.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Laurent Pinchart Jan. 20, 2019, 11:06 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Sun, Jan 20, 2019 at 03:04:35PM +0100, Niklas Söderlund wrote:
> Extend the document of the intended usage of DeviceMatch need for

s/document/documentation/

> information to correctly function to find a uniquely identifiable media

I'm not sure what you meant by the "need for information to correctly
function".

> device.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
> * Changes since v1
> - Rephrased most of it after review comments from Laurent, Thanks!
> 
>  src/libcamera/device_enumerator.cpp | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> index 55c510e3b79a415b..d41e1e580b3451ab 100644
> --- a/src/libcamera/device_enumerator.cpp
> +++ b/src/libcamera/device_enumerator.cpp
> @@ -52,6 +52,18 @@ namespace libcamera {
>   *
>   * The description is meant to be filled by pipeline managers and passed to a
>   * device enumerator to find matching media devices.
> + *
> + * A DeviceMatch is created with a specific Linux device driver in mind,
> + * therefore the name of the driver is a required property. One or more Entity
> + * names can be added as as match criteria.

s/as as/as/

> + *
> + * Pipeline handlers are recommended to add entities to DeviceMatch as
> + * appropriare to ensure that the media device they need can be uniquely
> + * identified. This is useful  when the corresponding kernel driver can produce

s/  / /

> + * different graphs, for instance as a result of different driver versions or
> + * hardware configurations, and not all those graphs are suitable for a pipeline
> + * handler.
> + *

s/^ \*\n//

With these fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>   */
>  
>  /**
Niklas Söderlund Jan. 22, 2019, 12:58 p.m. UTC | #2
Hi Laurent,

On 2019-01-21 01:06:43 +0200, Laurent Pinchart wrote:
> Hi Niklas,
> 
> Thank you for the patch.
> 
> On Sun, Jan 20, 2019 at 03:04:35PM +0100, Niklas Söderlund wrote:
> > Extend the document of the intended usage of DeviceMatch need for
> 
> s/document/documentation/
> 
> > information to correctly function to find a uniquely identifiable media
> 
> I'm not sure what you meant by the "need for information to correctly
> function".

How about,

Extend the documentation of the intended usage of DeviceMatch. The 
DeviceMatch needs enough information to be able to uniquely identify a 
specific media device.

> 
> > device.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> > ---
> > * Changes since v1
> > - Rephrased most of it after review comments from Laurent, Thanks!
> > 
> >  src/libcamera/device_enumerator.cpp | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> > index 55c510e3b79a415b..d41e1e580b3451ab 100644
> > --- a/src/libcamera/device_enumerator.cpp
> > +++ b/src/libcamera/device_enumerator.cpp
> > @@ -52,6 +52,18 @@ namespace libcamera {
> >   *
> >   * The description is meant to be filled by pipeline managers and passed to a
> >   * device enumerator to find matching media devices.
> > + *
> > + * A DeviceMatch is created with a specific Linux device driver in mind,
> > + * therefore the name of the driver is a required property. One or more Entity
> > + * names can be added as as match criteria.
> 
> s/as as/as/
> 
> > + *
> > + * Pipeline handlers are recommended to add entities to DeviceMatch as
> > + * appropriare to ensure that the media device they need can be uniquely
> > + * identified. This is useful  when the corresponding kernel driver can produce
> 
> s/  / /
> 
> > + * different graphs, for instance as a result of different driver versions or
> > + * hardware configurations, and not all those graphs are suitable for a pipeline
> > + * handler.
> > + *
> 
> s/^ \*\n//
> 
> With these fixed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >   */
> >  
> >  /**
> 
> -- 
> Regards,
> 
> Laurent Pinchart
Laurent Pinchart Jan. 22, 2019, 1:50 p.m. UTC | #3
Hi Niklas,

On Tue, Jan 22, 2019 at 01:58:08PM +0100, Niklas Söderlund wrote:
> On 2019-01-21 01:06:43 +0200, Laurent Pinchart wrote:
> > On Sun, Jan 20, 2019 at 03:04:35PM +0100, Niklas Söderlund wrote:
> >> Extend the document of the intended usage of DeviceMatch need for
> > 
> > s/document/documentation/
> > 
> >> information to correctly function to find a uniquely identifiable media
> > 
> > I'm not sure what you meant by the "need for information to correctly
> > function".
> 
> How about,
> 
> Extend the documentation of the intended usage of DeviceMatch. The 
> DeviceMatch needs enough information to be able to uniquely identify a 
> specific media device.

Much better, thanks.

> >> device.
> >> 
> >> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> >> ---
> >> * Changes since v1
> >> - Rephrased most of it after review comments from Laurent, Thanks!
> >> 
> >>  src/libcamera/device_enumerator.cpp | 12 ++++++++++++
> >>  1 file changed, 12 insertions(+)
> >> 
> >> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> >> index 55c510e3b79a415b..d41e1e580b3451ab 100644
> >> --- a/src/libcamera/device_enumerator.cpp
> >> +++ b/src/libcamera/device_enumerator.cpp
> >> @@ -52,6 +52,18 @@ namespace libcamera {
> >>   *
> >>   * The description is meant to be filled by pipeline managers and passed to a
> >>   * device enumerator to find matching media devices.
> >> + *
> >> + * A DeviceMatch is created with a specific Linux device driver in mind,
> >> + * therefore the name of the driver is a required property. One or more Entity
> >> + * names can be added as as match criteria.
> > 
> > s/as as/as/
> > 
> >> + *
> >> + * Pipeline handlers are recommended to add entities to DeviceMatch as
> >> + * appropriare to ensure that the media device they need can be uniquely
> >> + * identified. This is useful  when the corresponding kernel driver can produce
> > 
> > s/  / /
> > 
> >> + * different graphs, for instance as a result of different driver versions or
> >> + * hardware configurations, and not all those graphs are suitable for a pipeline
> >> + * handler.
> >> + *
> > 
> > s/^ \*\n//
> > 
> > With these fixed,
> > 
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> >>   */
> >>  
> >>  /**
Niklas Söderlund Jan. 22, 2019, 2:07 p.m. UTC | #4
Hello,

On 2019-01-22 15:50:55 +0200, Laurent Pinchart wrote:
> Hi Niklas,
> 
> On Tue, Jan 22, 2019 at 01:58:08PM +0100, Niklas Söderlund wrote:
> > On 2019-01-21 01:06:43 +0200, Laurent Pinchart wrote:
> > > On Sun, Jan 20, 2019 at 03:04:35PM +0100, Niklas Söderlund wrote:
> > >> Extend the document of the intended usage of DeviceMatch need for
> > > 
> > > s/document/documentation/
> > > 
> > >> information to correctly function to find a uniquely identifiable media
> > > 
> > > I'm not sure what you meant by the "need for information to correctly
> > > function".
> > 
> > How about,
> > 
> > Extend the documentation of the intended usage of DeviceMatch. The 
> > DeviceMatch needs enough information to be able to uniquely identify a 
> > specific media device.
> 
> Much better, thanks.

Thanks,

This patch is now merged to master.

> 
> > >> device.
> > >> 
> > >> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> > >> ---
> > >> * Changes since v1
> > >> - Rephrased most of it after review comments from Laurent, Thanks!
> > >> 
> > >>  src/libcamera/device_enumerator.cpp | 12 ++++++++++++
> > >>  1 file changed, 12 insertions(+)
> > >> 
> > >> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> > >> index 55c510e3b79a415b..d41e1e580b3451ab 100644
> > >> --- a/src/libcamera/device_enumerator.cpp
> > >> +++ b/src/libcamera/device_enumerator.cpp
> > >> @@ -52,6 +52,18 @@ namespace libcamera {
> > >>   *
> > >>   * The description is meant to be filled by pipeline managers and passed to a
> > >>   * device enumerator to find matching media devices.
> > >> + *
> > >> + * A DeviceMatch is created with a specific Linux device driver in mind,
> > >> + * therefore the name of the driver is a required property. One or more Entity
> > >> + * names can be added as as match criteria.
> > > 
> > > s/as as/as/
> > > 
> > >> + *
> > >> + * Pipeline handlers are recommended to add entities to DeviceMatch as
> > >> + * appropriare to ensure that the media device they need can be uniquely
> > >> + * identified. This is useful  when the corresponding kernel driver can produce
> > > 
> > > s/  / /
> > > 
> > >> + * different graphs, for instance as a result of different driver versions or
> > >> + * hardware configurations, and not all those graphs are suitable for a pipeline
> > >> + * handler.
> > >> + *
> > > 
> > > s/^ \*\n//
> > > 
> > > With these fixed,
> > > 
> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > 
> > >>   */
> > >>  
> > >>  /**
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Patch

diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
index 55c510e3b79a415b..d41e1e580b3451ab 100644
--- a/src/libcamera/device_enumerator.cpp
+++ b/src/libcamera/device_enumerator.cpp
@@ -52,6 +52,18 @@  namespace libcamera {
  *
  * The description is meant to be filled by pipeline managers and passed to a
  * device enumerator to find matching media devices.
+ *
+ * A DeviceMatch is created with a specific Linux device driver in mind,
+ * therefore the name of the driver is a required property. One or more Entity
+ * names can be added as as match criteria.
+ *
+ * Pipeline handlers are recommended to add entities to DeviceMatch as
+ * appropriare to ensure that the media device they need can be uniquely
+ * identified. This is useful  when the corresponding kernel driver can produce
+ * different graphs, for instance as a result of different driver versions or
+ * hardware configurations, and not all those graphs are suitable for a pipeline
+ * handler.
+ *
  */
 
 /**