From: Mark Brown <broonie@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] gpio/regulator: Allow nonexclusive GPIO access
Date: Thu, 11 Oct 2018 15:43:30 +0100 [thread overview]
Message-ID: <20181011144330.GF25351@sirena.org.uk> (raw)
In-Reply-To: <20181011143531.7195-1-linus.walleij@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
On Thu, Oct 11, 2018 at 04:35:31PM +0200, Linus Walleij wrote:
> + /*
> + * Some fixed regulators share the enable line between two
> + * regulators which makes it necessary to get a handle on the
> + * same descriptor for two different consumers. This will get
> + * the GPIO descriptor, but only the first call will initialize
> + * it so any flags such as inversion or open drain will only
> + * be set up by the first caller and assumed identical on the
> + * next caller.
> + *
> + * FIXME: find a better way to deal with this.
> + */
> + gflags |= GPIOD_FLAGS_BIT_NONEXCLUSIVE;
> +
It's not just fixed regulators that do this, often regulators with
register control can do this as well. Since power up is often a
performance critical path but regulators tend to be controlled via slow
buses like I2C it's common to have register control combined with a GPIO
enable line so you don't need to use the bus to do the enables. That
should just be a case of adding this flag to all the drivers that have
already been converted to gpiod (including the core code that's in
regulator_ena_gpio_request() which I thought was coping with this
already) unless I'm missing something?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-10-11 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181011143542epcas1p24f7b9193acf33746a2fc166bf63a8f77@epcas1p2.samsung.com>
2018-10-11 14:35 ` Linus Walleij
2018-10-11 14:43 ` Mark Brown [this message]
2018-10-11 17:01 ` Linus Walleij
2018-10-11 17:54 ` Mark Brown
2018-10-11 18:41 ` Linus Walleij
2018-10-12 16:10 ` Mark Brown
2018-10-11 15:15 ` Marek Szyprowski
2018-10-12 10:30 ` Jon Hunter
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=20181011144330.GF25351@sirena.org.uk \
--to=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.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
all inboxes | Powered by JetHome®