All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 1/2] pinctrl: sunxi: Deal with per-bank regulators
Date: Fri, 14 Dec 2018 16:08:48 +0100	[thread overview]
Message-ID: <CACRpkdZi2tqrwPh9_gi19X_MME1oXehv8AOvvfJmurSb5XDYKw@mail.gmail.com> (raw)
In-Reply-To: <3401ca7517927243f567899819e0d02eee12984f.1544104801.git-series.maxime.ripard@bootlin.com>

On Thu, Dec 6, 2018 at 3:02 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:

> The Allwinner SoCs have on most of their GPIO banks a regulator input.
>
> This issue was mainly ignored so far because either the regulator was a
> static regulator that would be providing power anyway, or the bank was used
> for a feature unsupported so far (CSI). For the odd cases, enabling it in
> the bootloader was the preferred option.
>
> However, now that we are starting to support those features, and that we
> can't really rely on the bootloader for this, we need to model those
> regulators as such in the DT.
>
> This is slightly more complicated than what it looks like, since some
> regulators will be tied to the PMIC, and in order to have access to the
> PMIC bus, you need to mux its pins, which will need the pinctrl driver,
> that needs the regulator driver to be registered. And this is how you get a
> circular dependency.
>
> In practice however, the hardware cannot fall into this case since it would
> result in a completely unusable bus. In order to avoid that circular
> dependency, we can thus get and enable the regulators at pin_request time.
> We'll then need to account for the references of all the pins of a
> particular branch to know when to put the reference, but it works pretty
> nicely once implemented.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Patch applied.

Yours,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 1/2] pinctrl: sunxi: Deal with per-bank regulators
Date: Fri, 14 Dec 2018 16:08:48 +0100	[thread overview]
Message-ID: <CACRpkdZi2tqrwPh9_gi19X_MME1oXehv8AOvvfJmurSb5XDYKw@mail.gmail.com> (raw)
In-Reply-To: <3401ca7517927243f567899819e0d02eee12984f.1544104801.git-series.maxime.ripard@bootlin.com>

On Thu, Dec 6, 2018 at 3:02 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:

> The Allwinner SoCs have on most of their GPIO banks a regulator input.
>
> This issue was mainly ignored so far because either the regulator was a
> static regulator that would be providing power anyway, or the bank was used
> for a feature unsupported so far (CSI). For the odd cases, enabling it in
> the bootloader was the preferred option.
>
> However, now that we are starting to support those features, and that we
> can't really rely on the bootloader for this, we need to model those
> regulators as such in the DT.
>
> This is slightly more complicated than what it looks like, since some
> regulators will be tied to the PMIC, and in order to have access to the
> PMIC bus, you need to mux its pins, which will need the pinctrl driver,
> that needs the regulator driver to be registered. And this is how you get a
> circular dependency.
>
> In practice however, the hardware cannot fall into this case since it would
> result in a completely unusable bus. In order to avoid that circular
> dependency, we can thus get and enable the regulators at pin_request time.
> We'll then need to account for the references of all the pins of a
> particular branch to know when to put the reference, but it works pretty
> nicely once implemented.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Patch applied.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2018-12-14 15:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 14:02 [PATCH 0/2] pinctrl: sunxi: Account for per-bank GPIO regulators Maxime Ripard
2018-12-06 14:02 ` Maxime Ripard
2018-12-06 14:02 ` [PATCH 1/2] pinctrl: sunxi: Deal with per-bank regulators Maxime Ripard
2018-12-06 14:02   ` Maxime Ripard
2018-12-14 15:08   ` Linus Walleij [this message]
2018-12-14 15:08     ` Linus Walleij
2018-12-14 15:11   ` Linus Walleij
2018-12-14 15:11     ` Linus Walleij
2018-12-17 13:16     ` Maxime Ripard
2019-01-07  5:20   ` Chen-Yu Tsai
2019-01-07  5:20     ` Chen-Yu Tsai
2019-01-09  4:36     ` Chen-Yu Tsai
2019-01-09  4:36       ` Chen-Yu Tsai
2018-12-06 14:02 ` [PATCH 2/2] ARM: dts: sun7i: bananapi: Add GPIO banks regulators Maxime Ripard
2018-12-06 14:02   ` Maxime Ripard
2018-12-14 15:10   ` Linus Walleij
2018-12-14 15:10     ` Linus Walleij
2018-12-06 15:28 ` [PATCH 0/2] pinctrl: sunxi: Account for per-bank GPIO regulators Chen-Yu Tsai
2018-12-06 15:28   ` Chen-Yu Tsai
2018-12-06 15:47   ` Maxime Ripard
2018-12-06 16:01     ` Chen-Yu Tsai
2018-12-06 16:01       ` Chen-Yu Tsai
2018-12-11 17:01       ` Maxime Ripard

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=CACRpkdZi2tqrwPh9_gi19X_MME1oXehv8AOvvfJmurSb5XDYKw@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=mylene.josserand@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.