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: <4f87f1f7-b7e9-4836-bcc0-7b564765abb0@kernel.org>
Date: Sun, 21 Jul 2024 11:58:05 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 linux-gpio@...r.kernel.org, linux-pwm@...r.kernel.org,
 Bartosz Golaszewski <brgl@...ev.pl>, Conor Dooley <conor+dt@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>,
 Linus Walleij <linus.walleij@...aro.org>, Rob Herring <robh@...nel.org>,
 Uwe Kleine-König <ukleinek@...nel.org>,
 Haibo Chen <haibo.chen@....com>, Clark Wang <xiaoning.wang@....com>,
 Frank Li <Frank.li@....com>
Subject: Re: [PATCH v5 1/4] dt-bindings: mfd: Add Analog Devices ADP5585

On 21/07/2024 11:45, Laurent Pinchart wrote:
> Hi Krzysztof,
> 
> On Sun, Jul 21, 2024 at 11:23:12AM +0200, Krzysztof Kozlowski wrote:
>> On 19/07/2024 22:39, Laurent Pinchart wrote:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  vdd-supply: true
>>> +
>>> +  gpio-controller: true
>>> +
>>> +  '#gpio-cells':
>>> +    const: 2
>>> +
>>> +  gpio-reserved-ranges: true
>>> +
>>> +  "#pwm-cells":
>>> +    const: 3
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - gpio-controller
>>> +  - "#gpio-cells"
>>> +  - "#pwm-cells"
>>> +
>>> +allOf:
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: adi,adp5585-01
>>> +    then:
>>> +      properties:
>>> +        gpio-reserved-ranges: false
>>> +    else:
>>> +      properties:
>>> +        gpio-reserved-ranges:
>>> +          items:
>>> +            - const: 5
>>> +            - const: 1
>>
>> Why reserved ranges are fixed? If they pins are *always* not accessible,
>> then these are not GPIOs. This really looks incorrect.
> 
> It's model-dependent. The ADP5585 has 11 pins that can be used as GPIOs.
> They are named GPIO 1 to GPIO 11 in the datasheet. The -01 variant uses
> the pin associated with GPIO 6 for a different purpose, so GPIO 6 is not
> usable. That maps to index 5 as GPIO numbers in DT bindings are 0-based.
> I've decided to handle that as a reserved GPIO range to keep the GPIO 7
> to GPIO 11 indices the same across all ADP5585 variants.

Ah, I missed the fact that gpio-reserved-ranges are not required, so
some of variants can just skip it. It's fine.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ