[lkml]   [2018]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] gpio/regulator: Allow nonexclusive GPIO access
On Thu, Oct 11, 2018 at 07:01:13PM +0200, Linus Walleij wrote:
> On Thu, Oct 11, 2018 at 4:43 PM Mark Brown <> wrote:
> > On Thu, Oct 11, 2018 at 04:35:31PM +0200, Linus Walleij wrote:

> > 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?

> Sorry if I don't get it... we already have code in the core to
> check if the same gpiod is used by two regulators.
> regulator_ena_gpio_request() does this:

> if (config->ena_gpiod)
> gpiod = config->ena_gpiod;
> else
> gpiod = gpio_to_desc(config->ena_gpio);

> So after the change I made to fixed.c this comes in through
> config->ena_gpiod.

Other regulators that have GPIO control for their enables do their own
requests (as does the core) so don't they all need to set the flag
GPIOD_FLAGS_BIT_NONEXCLUSIVE when they request otherwise it'll only work
in systems where the regulators after the first that request the GPIO
are fixed regulators?
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2018-10-11 19:55    [W:0.125 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site