From: Philipp Zabel <p.zabel@pengutronix.de>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
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>,
Tero Kristo <t-kristo@ti.com>, Maxime Ripard <mripard@kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [RFC v2 0/2] gpio: Support for shared GPIO lines on boards
Date: Wed, 06 Nov 2019 11:00:32 +0100 [thread overview]
Message-ID: <576d5e496a79c00857820289f8f772d3bb090e35.camel@pengutronix.de> (raw)
In-Reply-To: <e209692a-18a3-4079-fda7-1cc7b6b74667@ti.com>
On Wed, 2019-11-06 at 11:23 +0200, Peter Ujfalusi wrote:
>
> On 05/11/2019 20.07, Grygorii Strashko wrote:
> > > > (but hey - if this is boot only then gpio-hogs should work. Are they?)
> > >
> > > That is another thing which almost works ;)
> > > w/o gpio binding deferred probing is not possible if the GPIO controller
> > > is probed later.
> > > In some cases it might be even impossible to make sure that the GPIO
> > > controller would probe first (GPIO extender on different i2c bus than
> > > the user(s) of the gpio line)
> > > In some cases moving around nodes in DT might artificially make things
> > > work, but then someone compiles the expander as module, or some 'small'
> > > change in kernel and the probe order on the bus changes.
> > > I don't think it is a valid thing to have commits on the DT files
> > > saying: move the expander front/after the hog affected user since since
> > > Monday the probe order has changed. Then move it back two weeks later ;)
> > >
> >
> > Ok. Above sounds like real problem. The implicit dependence is exist,
> > but can't
> > be resolved if any driver depends on gpio-hog of some gpio-controller.
> > Probe deferring of gpio-controller will not lead to probe differing of
> > dependent driver.
> >
> > Question: will gpio-hog mechanism resolve your case if it works (and
> > probe differing issues)?
>
> I see gpio-hog to fulfill different role, use cases. It is more like
> controlling muxes on boards to select between different exclusive
> features. Things like route the I2S lines to analog codec or HDMI, route
> RGB video to LCD panel or to HDMI, etc.
>
> But, if it would work it could be used for components which can be
> enabled all the time. On the other hand, if a device has reset/enable
> line then the driver should have a way to control it.
I wonder if it would be useful to differentiate between required and
suggested state in the consumer facing GPIO API for nonexclusive GPIOs.
A driver that is ok with the enable line going into active state at any
time while the device is suspended could use
gpiod_set_value(en_gpio, 1);
to resume, but
gpiod_politely_suggest_value(en_gpio, 0);
or similar to suspend, and the core could allow other drivers to
override this state. Similarly to how the regulator framework allows
consumers to set a voltage range, and the core decides on the actual
voltage that fits the constraints.
regards
Philipp
next prev parent reply other threads:[~2019-11-06 10:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 12:04 [RFC v2 0/2] gpio: Support for shared GPIO lines on boards Peter Ujfalusi
2019-10-30 12:04 ` [RFC v2 1/2] dt-bindings: gpio: Add binding document for shared GPIO Peter Ujfalusi
2019-10-30 12:04 ` [RFC v2 2/2] gpio: Add new driver for handling 'shared' gpio lines on boards Peter Ujfalusi
2019-10-30 13:12 ` [RFC v2 0/2] gpio: Support for shared GPIO " Rob Herring
2019-10-30 13:32 ` Peter Ujfalusi
2019-10-30 13:51 ` Philipp Zabel
2019-10-30 14:03 ` Peter Ujfalusi
2019-10-30 14:17 ` Mark Brown
2019-10-30 14:31 ` Peter Ujfalusi
2019-10-30 18:49 ` Rob Herring
2019-10-31 8:01 ` Peter Ujfalusi
2019-11-01 13:46 ` Rob Herring
2019-11-01 15:21 ` Peter Ujfalusi
2019-11-04 19:11 ` Rob Herring
2019-11-05 9:58 ` Linus Walleij
2019-11-05 11:15 ` Peter Ujfalusi
2019-11-05 12:15 ` Grygorii Strashko
2019-11-05 12:32 ` Peter Ujfalusi
2019-11-05 18:07 ` Grygorii Strashko
2019-11-06 9:23 ` Peter Ujfalusi
2019-11-06 10:00 ` Philipp Zabel [this message]
2019-11-05 12:17 ` Peter Ujfalusi
2019-11-18 12:15 ` Enrico Weigelt, metux IT consult
2019-11-18 13:38 ` Philipp Zabel
2019-11-18 14:00 ` 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=576d5e496a79c00857820289f8f772d3bb090e35.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mripard@kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=robh+dt@kernel.org \
--cc=t-kristo@ti.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;
as well as URLs for NNTP newsgroup(s).