Message ID | 20200508100158.3437161-4-jacopo@jmondi.org |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v10,01/13] dt-bindings: video-interfaces: Document 'orientation' property | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 9 errors, 0 warnings, 15 lines checked |
On 08/05/2020 12:01, Jacopo Mondi wrote: > Add a DT header file to contain definitions for standard media properties. > > The file is named after: > Documentation/devicetree/bindings/media/video-interfaces.txt > which contains the standard media properties definitions. > > Initially add three macros to define the supported 'orientation' > property values. > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> For v11 just move this to the end of the series since it is an independent patch. > --- > include/dt-bindings/media/video-interfaces.h | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > create mode 100644 include/dt-bindings/media/video-interfaces.h > > diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h > new file mode 100644 > index 0000000000000..404c697d6bd6e > --- /dev/null > +++ b/include/dt-bindings/media/video-interfaces.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * include/dt-bindings/media/video-interfaces.h > + * > + * Copyright (C) 2020 Jacopo Mondi <jacopo@jmondi.org> > + */ > + > +#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > +#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > + > +#define FRONT_CAMERA <0> > +#define BACK_CAMERA <1> > +#define EXTERNAL_CAMERA <2> Wouldn't it be better to say CAMERA_FRONT (i.e. swap the words) or even CAMERA_ORIENTATION_FRONT? Regards, Hans > + > +#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */ > -- > 2.26.1 >
Hi Hans, On Fri, May 08, 2020 at 01:04:24PM +0200, Hans Verkuil wrote: > On 08/05/2020 12:01, Jacopo Mondi wrote: > > Add a DT header file to contain definitions for standard media properties. > > > > The file is named after: > > Documentation/devicetree/bindings/media/video-interfaces.txt > > which contains the standard media properties definitions. > > > > Initially add three macros to define the supported 'orientation' > > property values. > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> > > For v11 just move this to the end of the series since it is an independent > patch. Ack, I can leave it out as well, since I have no users if not a local one for testing. > > > --- > > include/dt-bindings/media/video-interfaces.h | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > create mode 100644 include/dt-bindings/media/video-interfaces.h > > > > diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h > > new file mode 100644 > > index 0000000000000..404c697d6bd6e > > --- /dev/null > > +++ b/include/dt-bindings/media/video-interfaces.h > > @@ -0,0 +1,15 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * include/dt-bindings/media/video-interfaces.h > > + * > > + * Copyright (C) 2020 Jacopo Mondi <jacopo@jmondi.org> > > + */ > > + > > +#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > > +#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > > + > > +#define FRONT_CAMERA <0> > > +#define BACK_CAMERA <1> > > +#define EXTERNAL_CAMERA <2> > > Wouldn't it be better to say CAMERA_FRONT (i.e. swap the words) or > even CAMERA_ORIENTATION_FRONT? Once I wrote orientation = CAMERA_FRONT; I realized that it was nicer to have orientation = FRONT_CAMERA: I'll stop bikeshedding though and wait for other comments to see if this can be included or not. > > Regards, > > Hans > > > + > > +#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */ > > -- > > 2.26.1 > > >
Hi Jacopo, Hans, On Sat, May 09, 2020 at 10:21:32AM +0200, Jacopo Mondi wrote: > Hi Hans, > > On Fri, May 08, 2020 at 01:04:24PM +0200, Hans Verkuil wrote: > > On 08/05/2020 12:01, Jacopo Mondi wrote: > > > Add a DT header file to contain definitions for standard media properties. > > > > > > The file is named after: > > > Documentation/devicetree/bindings/media/video-interfaces.txt > > > which contains the standard media properties definitions. > > > > > > Initially add three macros to define the supported 'orientation' > > > property values. > > > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> > > > > For v11 just move this to the end of the series since it is an independent > > patch. > > Ack, I can leave it out as well, since I have no users if not a local > one for testing. > > > > > > --- > > > include/dt-bindings/media/video-interfaces.h | 15 +++++++++++++++ > > > 1 file changed, 15 insertions(+) > > > create mode 100644 include/dt-bindings/media/video-interfaces.h > > > > > > diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h > > > new file mode 100644 > > > index 0000000000000..404c697d6bd6e > > > --- /dev/null > > > +++ b/include/dt-bindings/media/video-interfaces.h > > > @@ -0,0 +1,15 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > +/* > > > + * include/dt-bindings/media/video-interfaces.h > > > + * > > > + * Copyright (C) 2020 Jacopo Mondi <jacopo@jmondi.org> > > > + */ > > > + > > > +#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > > > +#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ > > > + > > > +#define FRONT_CAMERA <0> > > > +#define BACK_CAMERA <1> > > > +#define EXTERNAL_CAMERA <2> > > > > Wouldn't it be better to say CAMERA_FRONT (i.e. swap the words) or > > even CAMERA_ORIENTATION_FRONT? > > Once I wrote > orientation = CAMERA_FRONT; > > I realized that it was nicer to have > > orientation = FRONT_CAMERA: > > I'll stop bikeshedding though and wait for other comments to see if > this can be included or not. I'd be in favour of having "CAMERA" first. That gives it a nice prefix.
diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h new file mode 100644 index 0000000000000..404c697d6bd6e --- /dev/null +++ b/include/dt-bindings/media/video-interfaces.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * include/dt-bindings/media/video-interfaces.h + * + * Copyright (C) 2020 Jacopo Mondi <jacopo@jmondi.org> + */ + +#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ +#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ + +#define FRONT_CAMERA <0> +#define BACK_CAMERA <1> +#define EXTERNAL_CAMERA <2> + +#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */
Add a DT header file to contain definitions for standard media properties. The file is named after: Documentation/devicetree/bindings/media/video-interfaces.txt which contains the standard media properties definitions. Initially add three macros to define the supported 'orientation' property values. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- include/dt-bindings/media/video-interfaces.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/dt-bindings/media/video-interfaces.h -- 2.26.1