linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
To: Marco Felsch <m.felsch@pengutronix.de>,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Mark Brown <broonie@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Support Opensource <Support.Opensource@diasemi.com>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
	"andrew@aj.id.au" <andrew@aj.id.au>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"joel@jms.id.au" <joel@jms.id.au>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH v3 3/6] dt-bindings: mfd: da9062: add regulator voltage selection documentation
Date: Tue, 17 Dec 2019 09:53:52 +0000	[thread overview]
Message-ID: <AM5PR1001MB099460B2D291644F088707BA80500@AM5PR1001MB0994.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20191217090034.GD31182@pengutronix.de>

On 17 December 2019 09:01, Marco Felsch wrote:

> > > The enabel control signal is always available, please check [1] table
> > > 63. There is a mux in front of the enable pin so:
> > >
> > >              +-------------
> > >  Seq. |\     |   Regulator
> > >  GPI1 | \    |
> > >  GPI2 | | -- > Enable
> > >  GPI3 | /    |
> > >       |/     .
> > >              .
> > >              .
> > >
> > > Adam please correct me if this is wrong.
> >
> > Yes the register can always be configured regardless of the associated pin
> > configuration, but if say GPIO1 was configured as a GPO but a regulator was
> > configured to use GPIO1 as its GPI control mechanism, the output signal from
> > GPIO1 would be ignored, the sequencer control would not have any effect and
> > you're simply left with manual I2C control. Really we shouldn't be getting into
> > that situation though. If a GPIO is to be used as a regulator control signal
> > then it should be marked as such and I don't think we should be able to use that
> > pin for anything other than regulator control.
> 
> I see, so we have to guarantee that the requested gpio is configured as
> input. This can be done by:

This is one of the reasons I thought this was better suited to being done in the
pinctrl/pinmux side. If you configure the GPIO as for regulator control then
the code can automatically configure the GPIO for input. That doesn't then need
to be in the regulator driver.

But yes we wouldn't really want to configure a regulator to be controlled via a
GPI when it's configured as a GPO as it makes no sense.

> 
>   if (gpi->flags & FLAG_IS_OUT)
>   	return -EINVAL;
> 
> Regards,
>   Marco

  parent reply	other threads:[~2019-12-17  9:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 17:25 [PATCH v3 0/6] DA9062 PMIC features Marco Felsch
2019-11-29 17:25 ` [PATCH v3 1/6] gpio: treewide rename gpio_chip_hwgpio to gpiod_to_offset Marco Felsch
2019-12-02  2:59   ` Andrew Jeffery
2019-11-29 17:25 ` [PATCH v3 2/6] gpio: make gpiod_to_offset() available for other users Marco Felsch
2019-12-02  3:00   ` Andrew Jeffery
2019-11-29 17:25 ` [PATCH v3 3/6] dt-bindings: mfd: da9062: add regulator voltage selection documentation Marco Felsch
2019-12-04 13:46   ` Mark Brown
2019-12-10  9:41     ` Marco Felsch
2019-12-11 16:14       ` Adam Thomson
2019-12-11 17:09         ` Marco Felsch
2019-12-12 15:08           ` Linus Walleij
2019-12-12 15:55             ` Marco Felsch
2019-12-12 16:10           ` Mark Brown
2019-12-12 16:21             ` Marco Felsch
2019-12-12 16:51               ` Mark Brown
2019-12-16  8:55                 ` Marco Felsch
2019-12-16 11:44                   ` Mark Brown
2019-12-17  7:35                     ` Marco Felsch
2019-12-17 12:58                       ` Mark Brown
2020-01-07  8:36                         ` Marco Felsch
2020-01-07 13:09                           ` Mark Brown
2020-01-07 13:38                             ` Marco Felsch
2020-01-14 15:43                               ` Mark Brown
2019-12-16 16:32                   ` Adam Thomson
2019-12-17  9:00                     ` Marco Felsch
2019-12-17  9:12                       ` Marco Felsch
2019-12-17  9:53                       ` Adam Thomson [this message]
2019-12-17 12:31                         ` Marco Felsch
2019-12-17 13:13                           ` Adam Thomson
2019-12-16 16:32                   ` Adam Thomson
2019-12-16 12:28               ` Linus Walleij
2019-11-29 17:25 ` [PATCH v3 4/6] regulator: da9062: add voltage selection gpio support Marco Felsch
2019-11-29 17:25 ` [PATCH v3 5/6] dt-bindings: mfd: da9062: add regulator gpio enable/disable documentation Marco Felsch
2019-12-13 22:23   ` Rob Herring
2019-12-16 16:31   ` Lee Jones
2019-11-29 17:25 ` [PATCH v3 6/6] regulator: da9062: add gpio based regulator dis-/enable support Marco Felsch
2019-12-02 11:44 ` [PATCH v3 0/6] DA9062 PMIC features Linus Walleij
2019-12-02 12:04   ` Lee Jones

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=AM5PR1001MB099460B2D291644F088707BA80500@AM5PR1001MB0994.EURPRD10.PROD.OUTLOOK.COM \
    --to=adam.thomson.opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=andrew@aj.id.au \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.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;
as well as URLs for NNTP newsgroup(s).