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: <559908e3-ca6b-4bbd-846d-940cf338e2b7@kernel.org>
Date: Sat, 2 Nov 2024 08:56:00 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: hs@...x.de, linux-kernel@...r.kernel.org
Cc: Conor Dooley <conor+dt@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Linus Walleij <linus.walleij@...aro.org>,
 Neil Armstrong <neil.armstrong@...aro.org>, Rob Herring <robh@...nel.org>,
 devicetree@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line
 naming

On 02/11/2024 06:24, Heiko Schocher wrote:
>>>     reg:
>>>       maxItems: 1
>>>   
>>> +  gpio-line-names:
>>> +    minItems: 1
>>
>> I think gpio-line-names should always match the actual number of GPIOs
>> for given device. Do you have here devices with 1 gpio? This could be
>> further constrained in if:then sections.
> 
> I have the device with "sx150x_16_pins", see drivers/pinctrl/pinctrl-sx150x.c
> 
> I started with minItems, because I thought it is okay to allow
> less names... (as I did in patch 3/3) but see now, that other drivers have
> minItems = maxItems.
> 
> So I think I should add to my patch the following part:

Yes, but in top-level you keep widest constraints, so min 5 max 17.

> 
> hs@...eadripper:linux  [aristainetos3-dts-v3] $ git diff
> diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml 
> b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> index fd0936545bb8..0872ee1c6fa6 100644
> --- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> @@ -91,6 +91,45 @@ required:
> 
>   allOf:
>     - $ref: pinctrl.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1501q
> +              - semtech,sx1504q
> +              - semtech,sx1507q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 5
> +              maxItems: 5
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1502q
> +              - semtech,sx1505q
> +              - semtech,sx1508q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 9
> +              maxItems: 9
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1503q
> +              - semtech,sx1506q
> +              - semtech,sx1509q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 17
> +              maxItems: 17
>     - if:
>         not:
>           properties:


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ