From: Krzysztof Kozlowski <krzk@kernel.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Lee Jones" <lee@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Haibo Chen" <haibo.chen@nxp.com>,
"Clark Wang" <xiaoning.wang@nxp.com>,
"Frank Li" <Frank.li@nxp.com>
Subject: Re: [PATCH v5 1/4] dt-bindings: mfd: Add Analog Devices ADP5585
Date: Sun, 21 Jul 2024 11:58:05 +0200 [thread overview]
Message-ID: <4f87f1f7-b7e9-4836-bcc0-7b564765abb0@kernel.org> (raw)
In-Reply-To: <20240721094520.GA5732@pendragon.ideasonboard.com>
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
next prev parent reply other threads:[~2024-07-21 9:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 20:39 [PATCH v5 0/4] ADP5585 GPIO expander, PWM and keypad controller support Laurent Pinchart
2024-07-19 20:39 ` [PATCH v5 1/4] dt-bindings: mfd: Add Analog Devices ADP5585 Laurent Pinchart
2024-07-19 22:10 ` Rob Herring (Arm)
2024-07-21 9:23 ` Krzysztof Kozlowski
2024-07-21 9:45 ` Laurent Pinchart
2024-07-21 9:58 ` Krzysztof Kozlowski [this message]
2024-07-19 20:39 ` [PATCH v5 2/4] mfd: adp5585: Add Analog Devices ADP5585 core support Laurent Pinchart
2024-07-19 21:31 ` Frank Li
2024-07-21 14:58 ` Laurent Pinchart
2024-07-19 20:39 ` [PATCH v5 3/4] gpio: adp5585: Add Analog Devices ADP5585 support Laurent Pinchart
2024-07-19 21:38 ` Frank Li
2024-07-19 20:39 ` [PATCH v5 4/4] pwm: " Laurent Pinchart
2024-07-19 21:43 ` Frank Li
2024-07-21 7:09 ` Uwe Kleine-König
2024-07-21 15:22 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f87f1f7-b7e9-4836-bcc0-7b564765abb0@kernel.org \
--to=krzk@kernel.org \
--cc=Frank.li@nxp.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=haibo.chen@nxp.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=ukleinek@kernel.org \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox