From: Linus Walleij <linus.walleij@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Mark Brown <broonie@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [RFC 1/2] dt-bindings: gpio: Document shared GPIO line usage
Date: Wed, 11 Dec 2019 00:54:52 +0100 [thread overview]
Message-ID: <CACRpkdZOn8vGjxCUBd9c-SQSkmwxpS+bbRk7TiOWJcpTz9BsBQ@mail.gmail.com> (raw)
In-Reply-To: <20191203235113.GA12929@bogus>
On Wed, Dec 4, 2019 at 12:51 AM Rob Herring <robh@kernel.org> wrote:
> On Thu, Nov 28, 2019 at 11:06:35AM +0100, Linus Walleij wrote:
> > The ambition to use refcounted GPIOs to solve this
> > usecase is probably wrong, I would say try to go for a
> > GPIO-based reset controller instead.
>
> Yes, but I think we can have that AND use the existing binding.
>
> > The fact that some Linux drivers are already using explicit
> > GPIO's for their reset handling is maybe unfortunate,
> > they will simply have to grow code to deal with a reset
> > alternatively to GPIO, like first try to grab a reset
> > handle and if that doesn't fall back to use a GPIO.
>
> I think this could just be all handled within the reset subsystem given
> that we've been consistent in using 'reset-gpios' (GPIO regulators are
> similar, but we never had such consistency with GPIO names for
> regulators). We can implement a reset driver for the 'reset-gpios'
> property that deals with the sharing. Drivers to DT nodes doesn't have
> to be 1:1. It's convenient when they are, but that's encoding the OS's
> (current) driver structure into DT.
This seems like a good approach if it can be made to work.
reset-gpios should have the right polarity flags (else drivers
and/or device trees need to be fixed...) so the driver can simply
scan over them and try to build a consensus on how to assert
or deassert a shared reset-gpios line.
It is also a natural placeholder for the connection to device
core that will inevitably need to happen the day the device
hierarchy needs to be torn up/down for a reset on some
random device.
Peter, will you have a go at it?
Yours,
Linus Walleij
next prev parent reply other threads:[~2019-12-10 23:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 13:34 [RFC 0/2] gpiolib: Initial, basic support for shared GPIO lines Peter Ujfalusi
2019-11-20 13:34 ` [RFC 1/2] dt-bindings: gpio: Document shared GPIO line usage Peter Ujfalusi
2019-11-22 12:10 ` Linus Walleij
2019-11-22 13:36 ` Peter Ujfalusi
2019-11-28 10:06 ` Linus Walleij
2019-12-02 21:31 ` Peter Ujfalusi
2019-12-11 0:06 ` Linus Walleij
2019-12-03 23:51 ` Rob Herring
2019-12-10 23:54 ` Linus Walleij [this message]
2019-11-20 13:34 ` [RFC 2/2] gpiolib: Support for (output only) shared GPIO line Peter Ujfalusi
2019-11-22 12:22 ` Linus Walleij
2019-11-22 15:14 ` Peter Ujfalusi
2019-11-20 13:49 ` [RFC 0/2] gpiolib: Initial, basic support for shared GPIO lines Peter Ujfalusi
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=CACRpkdZOn8vGjxCUBd9c-SQSkmwxpS+bbRk7TiOWJcpTz9BsBQ@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=peter.ujfalusi@ti.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).