lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210708140235.GB3@paasikivi.fi.intel.com>
Date:   Thu, 8 Jul 2021 17:02:35 +0300
From:   "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>
To:     Stefan Riedmüller <S.Riedmueller@...tec.de>
Cc:     "mchehab@...nel.org" <mchehab@...nel.org>,
        "laurent.pinchart@...asonboard.com" 
        <laurent.pinchart@...asonboard.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
Subject: Re: [PATCH v4 5/6] media: dt-bindings: mt9p031: Convert bindings to
 yaml

Hi Stefan,

On Thu, Jul 08, 2021 at 01:34:17PM +0000, Stefan Riedmüller wrote:
> Hi Sakari,
> 
> On Thu, 2021-07-08 at 14:23 +0300, Sakari Ailus wrote:
> > Hi Stefan,
> > 
> > Thanks for the patch.
> 
> Thanks for your feedback!

You're welcome!

> 
> > 
> > On Thu, Jul 08, 2021 at 11:19:21AM +0200, Stefan Riedmueller wrote:
> > > Convert mt9p031 sensor bindings to yaml schema. Also update the
> > > MAINTAINERS entry.
> > > 
> > > Signed-off-by: Stefan Riedmueller <s.riedmueller@...tec.de>
> > > ---
> > >  .../bindings/media/i2c/aptina,mt9p031.yaml    | 75 +++++++++++++++++++
> > >  .../devicetree/bindings/media/i2c/mt9p031.txt | 40 ----------
> > >  MAINTAINERS                                   |  1 +
> > >  3 files changed, 76 insertions(+), 40 deletions(-)
> > >  create mode 100644
> > > Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml
> > >  delete mode 100644
> > > Documentation/devicetree/bindings/media/i2c/mt9p031.txt
> > > 
> > > diff --git
> > > a/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml
> > > b/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml
> > > new file mode 100644
> > > index 000000000000..7de62e339895
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml
> > > @@ -0,0 +1,75 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/media/i2c/mt9p031.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Aptina 1/2.5-Inch 5Mp CMOS Digital Image Sensor
> > > +
> > > +maintainers:
> > > +  - Laurent Pinchart <laurent.pinchart@...asonboard.com>
> > > +
> > > +description: |
> > > +  The Aptina MT9P031 is a 1/2.5-inch CMOS active pixel digital image
> > > sensor
> > > +  with an active array size of 2592H x 1944V. It is programmable through
> > > a
> > > +  simple two-wire serial interface.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - aptina,mt9p031
> > > +      - aptina,mt9p031m
> > > +
> > > +  reg:
> > > +    description: I2C device address
> > > +    maxItems: 1
> > > +
> > > +  reset-gpios:
> > > +    maxItems: 1
> > > +    description: Chip reset GPIO
> > > +
> > > +  port:
> > > +    $ref: /schemas/graph.yaml#/properties/port
> > 
> > This should probably be:
> > 
> > 	$ref: /schemas/graph.yaml#/$defs/port-base
> 
> I actually was not sure which one of these to use because I found both in
> existing bindings. Also /schemas/graph.yaml#/properties/port has a reference
> to $defs/port-base. It would be nice if you or someone else could give me a
> hint why /schemas/graph.yaml#/$defs/port-base would be the correct one here.

I haven't dug into the details but:

<URL:https://lore.kernel.org/linux-media/20210623164344.2571043-1-robh@kernel.org/T/>

> 
> > 
> > > +    addittionalProeprties: false
> > 
> > Could you run
> > 
> > 	make dt_binding_check
> > DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.y
> > aml
> > 
> > please?
> 
> Sorry, I totally forgot about this. I'll do so before sending the next
> version.

No worries.

> 
> > 
> > > +
> > > +    properties:
> > > +      endpoint:
> > > +        $ref: /schemas/media/video-interfaces.yaml#
> > > +        unevaluatedProperties: false
> > > +
> > > +        properties:
> > > +          input-clock-frequency: true
> > > +          pixel-clock-frequency: true
> > 
> > These two legacy properties were not in the endpoint previously.
> 
> That's right, but they are being parsed from the endpoint so I figured they
> belong here. Should I mention this in the commit message?

Please do. I missed the driver did this.

Ideally the driver would use the common properties but it's old and
unlikely to be used in new boards anyway I guess.

> 
> Thanks,
> Stefan
> 
> > 
> > > +
> > > +        required:
> > > +          - input-clock-frequency
> > > +          - pixel-clock-frequency
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - port
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    i2c0 {
> > > +        #address-cells = <1>;
> > > +        #size-cells = <0>;
> > > +
> > > +        mt9p031@5d {
> > > +            compatible = "aptina,mt9p031";
> > > +            reg = <0x5d>;
> > > +            reset-gpios = <&gpio_sensor 0 0>;
> > > +
> > > +            port {
> > > +                mt9p031_1: endpoint {
> > > +                    input-clock-frequency = <6000000>;
> > > +                    pixel-clock-frequency = <96000000>;
> > > +                };
> > > +            };
> > > +        }:
> > > +    };
> > > +
> > > +...
> > > diff --git a/Documentation/devicetree/bindings/media/i2c/mt9p031.txt
> > > b/Documentation/devicetree/bindings/media/i2c/mt9p031.txt
> > > deleted file mode 100644
> > > index cb60443ff78f..000000000000
> > > --- a/Documentation/devicetree/bindings/media/i2c/mt9p031.txt
> > > +++ /dev/null
> > > @@ -1,40 +0,0 @@
> > > -* Aptina 1/2.5-Inch 5Mp CMOS Digital Image Sensor
> > > -
> > > -The Aptina MT9P031 is a 1/2.5-inch CMOS active pixel digital image sensor
> > > with
> > > -an active array size of 2592H x 1944V. It is programmable through a
> > > simple
> > > -two-wire serial interface.
> > > -
> > > -Required Properties:
> > > -- compatible: value should be either one among the following
> > > -	(a) "aptina,mt9p031" for mt9p031 sensor
> > > -	(b) "aptina,mt9p031m" for mt9p031m sensor
> > > -
> > > -- input-clock-frequency: Input clock frequency.
> > > -
> > > -- pixel-clock-frequency: Pixel clock frequency.
> > > -
> > > -Optional Properties:
> > > -- reset-gpios: Chip reset GPIO
> > > -
> > > -For further reading on port node refer to
> > > -Documentation/devicetree/bindings/media/video-interfaces.txt.
> > > -
> > > -Example:
> > > -
> > > -	i2c0@...2000 {
> > > -		...
> > > -		...
> > > -		mt9p031@5d {
> > > -			compatible = "aptina,mt9p031";
> > > -			reg = <0x5d>;
> > > -			reset-gpios = <&gpio3 30 0>;
> > > -
> > > -			port {
> > > -				mt9p031_1: endpoint {
> > > -					input-clock-frequency = <6000000>;
> > > -					pixel-clock-frequency = <96000000>;
> > > -				};
> > > -			};
> > > -		};
> > > -		...
> > > -	};
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index c7456776ace5..f2123226baae 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -12610,6 +12610,7 @@ M:	Laurent Pinchart <
> > > laurent.pinchart@...asonboard.com>
> > >  L:	linux-media@...r.kernel.org
> > >  S:	Maintained
> > >  T:	git git://linuxtv.org/media_tree.git
> > > +F:	Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml
> > >  F:	drivers/media/i2c/mt9p031.c
> > >  F:	include/media/i2c/mt9p031.h
> > >  

-- 
Regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ