Linux PWM subsystem development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
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 12:45:20 +0300	[thread overview]
Message-ID: <20240721094520.GA5732@pendragon.ideasonboard.com> (raw)
In-Reply-To: <f962a71c-6be7-4ad2-9753-e1f9ab7a38a0@kernel.org>

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.

> Anyway, testing reports failures which *must* be addressed, one way or
> another.

Yes I'll fix that.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-07-21  9:45 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 [this message]
2024-07-21  9:58       ` Krzysztof Kozlowski
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=20240721094520.GA5732@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --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=krzk@kernel.org \
    --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