Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1517163

Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads
Date 2016-11-08 14:30 +0100
Message-ID <sBeDn-1rd-5@gated-at.bofh.it> (permalink)
References (1 earlier) <sz01Q-4pv-5@gated-at.bofh.it> <szV9M-7J1-15@gated-at.bofh.it> <sAL8l-7dK-5@gated-at.bofh.it> <sBbFw-84M-31@gated-at.bofh.it> <sBc8x-8ek-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 8, 2016 at 11:20 AM, Laxman Dewangan <ldewangan@nvidia.com> wrote:
> On Tuesday 08 November 2016 03:45 PM, Linus Walleij wrote:

>> If you can *actually* change the volatage, it needs to be modeled
>> as a (fixed voltage?) regulator, not as a custom property for the pin
>> control attributes. I guess you definiately need the regulator framework
>> to accumulate and infer the different consumer requirements anyway
>> in that case.
>
> The PMIC voltage output is changed via regulator calls.
> Here, we need to have two configruations for given voltage level of
> interface:
> * One at IO voltage from PMIC via regulator call to change votlage of IO
> rail.
> * Second, configure the IO pad register to tell the IO voltage level so that
> it can configured internally for that level.

I understand! (I think.)

But then the two things (A) changing the regulator voltage and (B) changing
the pin setting need to happen at the same time do they
not?

Now you're just hardcoding something into these device tree properties
and hoping that the regulators will somehow be set up in accordance to
what you set up for the pads in the device tree, correct?

To me it seems like the pins/pads should all have an <&phandle> to
the regulator controlling its voltage output, in the device tree.

In the Linux kernel, the driver has to regulator_[bulk_]get() this for
each pin, check the voltage with regulator_get_voltage() and set up
this according to the supplied voltage.

The driver then ideally should subscribe to regulator voltage notifier
events to change the setting if the voltage changes. I guess. But
atleast the first step seems inevitable: get the voltage from a regulator.

Else there is no dependency between the regulator and its consumer.

So what your pins need is a regulator phandle, not a magic value to
be poked into a register, hoping things will match up.

I understand that this is a simple quick-and-dirty solution but it is
not the right solution.

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-02 10:30 +0100
  Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Linus Walleij <linus.walleij@linaro.org> - 2016-11-04 23:30 +0100
    Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-07 07:00 +0100
      Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Linus Walleij <linus.walleij@linaro.org> - 2016-11-08 11:20 +0100
        Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-08 11:50 +0100
          Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Linus Walleij <linus.walleij@linaro.org> - 2016-11-08 14:30 +0100
            Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-08 15:00 +0100
              Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Thierry Reding <thierry.reding@gmail.com> - 2016-11-08 15:50 +0100
                Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-08 17:10 +0100
              Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Linus Walleij <linus.walleij@linaro.org> - 2016-11-08 16:50 +0100
                Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and  power of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-11-08 17:10 +0100

csiph-web