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: <tpl7wufkyog2bvnhg36keczeokadxkqkcoiy5qjscsoosxsiql@6a3ghbo4pc7f>
Date: Thu, 5 Sep 2024 08:39:10 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Alexandru Ardelean <aardelean@...libre.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	devicetree@...r.kernel.org, jic23@...nel.org, krzk+dt@...nel.org, robh@...nel.org, 
	lars@...afoo.de, michael.hennerich@...log.com, gstols@...libre.com
Subject: Re: [PATCH v3 7/8] dt-bindings: iio: adc: add adi,ad7606c-{16,18}
 compatible strings

On Wed, Sep 04, 2024 at 10:27:15AM +0300, Alexandru Ardelean wrote:
> @@ -114,6 +124,45 @@ properties:
>        assumed that the pins are hardwired to VDD.
>      type: boolean
>  
> +patternProperties:
> +  "^channel@([1-8])$":

Drop ()

> +    type: object
> +    $ref: adc.yaml
> +    unevaluatedProperties: false
> +
> +    properties:
> +      reg:
> +        description:
> +          The channel number, as specified in the datasheet (from 1 to 8).
> +        minimum: 1
> +        maximum: 8
> +
> +      diff-channels:
> +        description:
> +          Each channel can be configured as a differential bipolar channel.
> +          The ADC uses the same positive and negative inputs for this.
> +          This property must be specified as 'reg' (or the channel number) for
> +          both positive and negative inputs (i.e. diff-channels = <reg reg>).
> +        items:
> +          minimum: 1
> +          maximum: 8
> +
> +      bipolar:
> +        description:
> +          Each channel can be configured as a unipolar or bipolar single-ended.
> +          When this property is not specified, it's unipolar, so the ADC will
> +          have only the positive input wired.
> +          For this ADC the 'diff-channels' & 'bipolar' properties are mutually
> +          exclusive.
> +
> +    oneOf:
> +      - required:
> +          - reg
> +          - diff-channels
> +      - required:
> +          - reg
> +          - bipolar

rather:

required:
  - reg

oneOf:
 - required:
     - diff-channels
 - required:
    - bipolar

> +
>  required:
>    - compatible
>    - reg
> @@ -170,6 +219,17 @@ allOf:
>          adi,conversion-start-gpios:
>            maxItems: 1
>  
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            enum:
> +              - adi,ad7606c-16
> +              - adi,ad7606c-18
> +    then:
> +      patternProperties:
> +        "^channel@[1-8]+$": false


You have two different patterns here and in top-level. Please keep one:
^channel@[1-8]$


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ