From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
Marek Vasut <marex@denx.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v1 0/3] gpio: Add gpio-delay support
Date: Fri, 14 Apr 2023 08:37:36 +0200 [thread overview]
Message-ID: <4800953.GXAFRqVoOG@steina-w> (raw)
In-Reply-To: <CAHp75VeR5R_CqWNT=Fpbyp-YSeo+3QXBnR62C=K_tyr-qQ2MVw@mail.gmail.com>
Am Dienstag, 11. April 2023, 11:34:16 CEST schrieb Andy Shevchenko:
> On Tue, Apr 11, 2023 at 10:19 AM Alexander Stein
>
> <alexander.stein@ew.tq-group.com> wrote:
> > Am Freitag, 7. April 2023, 20:57:32 CEST schrieb
andy.shevchenko@gmail.com:
> > > Thu, Apr 06, 2023 at 11:33:41AM +0200, Alexander Stein kirjoitti:
> ...
>
> > > > thanks for the feedback I've received. This is the first non-RFC
> > > > series
> > > > for
> > > > adressing a platform specific ramp-up/ramp-down delay on GPIO outputs.
> > > >
> > > > Changes compared to RFC v2 are mentioned in each patch.
> > >
> > > Reading the (poor?) documentation does not clarify the use case.
> > > Looking at them I think that this can be implemented as debounce.
> >
> > Debounce for GPIOs? There is nothing like that yet.
>
> At least that what we have already done in the code, you can just
> provide a similar feature to the output pins, no?
Adding this kind of property to outputs (GPIO chips) has been rejected
already, both on DT side as well as libgpio side, see [1] and [2].
> > > Also I have no clue why it's so important that we _need_ to have a
> > > driver for this. We have plenty of consumer drivers that implement
> > > delays on ramping up or down or whatever if they need.
> >
> > But this delay I am dealing with is actually not consumer dependent, e.g.
> > a
> > power-on delay specified in a datasheet. Instead this driver deals with a
> > platform-specific curiosity, e.g. RC-circuit on an open-drain output. So
> > this is something which sits inbetween ICs.
> > In the RFC we came to the conclusion to not adjust (each) consumer to deal
> > with this, given this will be rarely used. Instead provide a generic way
> > for specifying this delay.
>
> So, taking the above into consideration, why is it GPIO property to
> begin with? This is PCB property of the certain platform design that
> needs to be driven by a specific driver, correct?
True this is induced by the PCB, but this property applies to the GPIO,
neither the GPIO controller output, nor the GPIO consumer is aware of.
So it has to be added in between. The original idea to add a property for the
consumer driver is also rejected, because this kind of behavior is not limited
to this specific driver.
That's why the delay is inserted in between the GPIO output and GPIO consumer.
> At the very least this is pin configuration (but external to the SoC),
> so has to be a _separate_ pin control in my opinion.
Sorry, I don't get what you mean by _separate_ pin control.
> > > Which part(s) did I got wrong?
> >
> > Maybe there needs to be an explicit example in the bindings document
> > what's
> > the actual issue to deal with.
> > Right now if a GPIO is set, it is expected the signal on the receiver side
> > has changed as well within a negligible time as well. But due to external
> > reasons (see RC_curcuit above) the change on the receiver side can occur
> > much later,>
> > >100ms in my case.
>
> I still don't understand why it is a problem. If each signal is
> delayed then the caller should be aware of the delay, no?
Then we are back to square one, to decide where to take consideration of that
delay. Up until now there have been several proposals:
1. GPIO consumer [3]
2. GPIO controller [4]
3. GPIO delay node (this series)
1. and 2. have been rejected, because that delay is taken care of where it is
not caused.
3. explicitly declares the location of that delay. It's less/not intrusive to
existing parts and purely optional. Given this is a rare case, but not limited
to us, option 3 seems a good way to go.
Best regards,
Alexander
[1] https://lore.kernel.org/linux-gpio/CAL_JsqLeqpMuRkvpT2-x5q+8e4bHf4oLDML2QqCOgRMAg8=CsA@mail.gmail.com/
[2] https://lore.kernel.org/linux-gpio/
CACRpkdYioW1GROHFxA1vuAEiXqHh6fAu5CXNLcTvW_w3mWjSPw@mail.gmail.com/
[3] https://lore.kernel.org/dri-devel/20221209083339.3780776-1-alexander.stein@ew.tq-group.com/
[4] https://lore.kernel.org/linux-gpio/20221212103525.231298-1-alexander.stein@ew.tq-group.com/
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2023-04-14 6:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 9:33 [PATCH v1 0/3] gpio: Add gpio-delay support Alexander Stein
2023-04-06 9:33 ` [PATCH v1 1/3] dt-bindings: gpio: Add gpio-delay binding document Alexander Stein
2023-05-31 16:37 ` Krzysztof Kozlowski
2023-06-02 16:29 ` Bartosz Golaszewski
2023-04-06 9:33 ` [PATCH v1 2/3] gpio: Add gpio delay driver Alexander Stein
2023-06-02 16:31 ` Bartosz Golaszewski
2023-04-06 9:33 ` [PATCH v1 3/3] [DNI] arm64: dts: mba8mx: Use gpio-delay for LVDS bridge Alexander Stein
2023-04-07 18:57 ` [PATCH v1 0/3] gpio: Add gpio-delay support andy.shevchenko
2023-04-11 7:19 ` Alexander Stein
2023-04-11 9:34 ` Andy Shevchenko
2023-04-14 6:37 ` Alexander Stein [this message]
2023-04-15 15:06 ` Andy Shevchenko
2023-04-16 7:42 ` Krzysztof Kozlowski
2023-04-16 9:36 ` Andy Shevchenko
2023-04-16 11:04 ` Krzysztof Kozlowski
2023-04-16 11:14 ` Andy Shevchenko
2023-04-16 11:21 ` Krzysztof Kozlowski
2023-04-16 11:33 ` Andy Shevchenko
2023-04-16 11:42 ` Krzysztof Kozlowski
2023-04-16 18:46 ` Andy Shevchenko
2023-05-31 6:53 ` Alexander Stein
2023-05-31 12:02 ` Andy Shevchenko
2023-05-31 13:44 ` Linus Walleij
2023-05-31 14:37 ` Andy Shevchenko
2023-05-31 16:37 ` Krzysztof Kozlowski
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=4800953.GXAFRqVoOG@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marex@denx.de \
--cc=robh+dt@kernel.org \
/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