All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
	Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH V3 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads
Date: Wed, 23 Nov 2016 17:12:37 +0530	[thread overview]
Message-ID: <583580AD.60803@nvidia.com> (raw)
In-Reply-To: <CACRpkdZK34QfbSBJvshfZekk5TJBU5sZog-9uszLSmFPOGJgiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


On Tuesday 22 November 2016 06:28 PM, Linus Walleij wrote:
> On Tue, Nov 22, 2016 at 11:20 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>
>> +               rinfo->regulator = devm_regulator_get_optional(dev,
>> +                                               soc_data->cfg[i].vsupply);
> Please just use devm_regulator_get().
>
> As has been discussed at lenth elsewhere "optional" in regulator_get_optional
> does *not* mean "software optional", it means "hardware optional".
>
> Such as a terminal that may have a voltage connected or not be
> connected to anything at all.
>
> If the system does not define a regulator you will anyway get a
> dummy regulator.
>
The issue with dummy regulator is that the other regulator APIs with 
dummy regulator fails.
Once we get the dummy regulator, there is no way to know whether the 
returned regulator is actual or dummy and when calling the 
regulator_get_voltage() it failed.

[    2.917176] pinctrl-t210-io-pad.0 supply vddio-audio-hv not found, 
using dummy regulator
[    2.925510] pinctrl-tegra-io-pad pinctrl-t210-io-pad.0: Failed to get 
voltage for rail vddio-aud2


Here, we need the regulator handle which can support the other regulator 
APIs.

In some of platforms, we do not use some of the io-pins and on this 
case, we do not connect the IO rail supply for these pins. So this is 
like a hardware optional.

If the IO pins are used then it need to have the proper regulator handle.
Missing regulator handle on DT will be like that IO pads are not used.


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Stephen Warren <swarren@wwwdotorg.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Joe Perches <joe@perches.com>, Jon Hunter <jonathanh@nvidia.com>
Subject: Re: [PATCH V3 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads
Date: Wed, 23 Nov 2016 17:12:37 +0530	[thread overview]
Message-ID: <583580AD.60803@nvidia.com> (raw)
In-Reply-To: <CACRpkdZK34QfbSBJvshfZekk5TJBU5sZog-9uszLSmFPOGJgiw@mail.gmail.com>


On Tuesday 22 November 2016 06:28 PM, Linus Walleij wrote:
> On Tue, Nov 22, 2016 at 11:20 AM, Laxman Dewangan <ldewangan@nvidia.com> wrote:
>
>> +               rinfo->regulator = devm_regulator_get_optional(dev,
>> +                                               soc_data->cfg[i].vsupply);
> Please just use devm_regulator_get().
>
> As has been discussed at lenth elsewhere "optional" in regulator_get_optional
> does *not* mean "software optional", it means "hardware optional".
>
> Such as a terminal that may have a voltage connected or not be
> connected to anything at all.
>
> If the system does not define a regulator you will anyway get a
> dummy regulator.
>
The issue with dummy regulator is that the other regulator APIs with 
dummy regulator fails.
Once we get the dummy regulator, there is no way to know whether the 
returned regulator is actual or dummy and when calling the 
regulator_get_voltage() it failed.

[    2.917176] pinctrl-t210-io-pad.0 supply vddio-audio-hv not found, 
using dummy regulator
[    2.925510] pinctrl-tegra-io-pad pinctrl-t210-io-pad.0: Failed to get 
voltage for rail vddio-aud2


Here, we need the regulator handle which can support the other regulator 
APIs.

In some of platforms, we do not use some of the io-pins and on this 
case, we do not connect the IO rail supply for these pins. So this is 
like a hardware optional.

If the IO pins are used then it need to have the proper regulator handle.
Missing regulator handle on DT will be like that IO pads are not used.

  parent reply	other threads:[~2016-11-23 11:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 10:20 [PATCH V3 0/2] pinctrl: tegra: Add support for IO pad control Laxman Dewangan
2016-11-22 10:20 ` Laxman Dewangan
2016-11-22 10:20 ` [PATCH V3 1/2] pinctrl: tegra: Add DT binding for io pads control Laxman Dewangan
2016-11-22 10:20   ` Laxman Dewangan
     [not found] ` <1479810013-29894-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-22 10:20   ` [PATCH V3 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads Laxman Dewangan
2016-11-22 10:20     ` Laxman Dewangan
2016-11-22 12:58     ` Linus Walleij
     [not found]       ` <CACRpkdZK34QfbSBJvshfZekk5TJBU5sZog-9uszLSmFPOGJgiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-23 11:42         ` Laxman Dewangan [this message]
2016-11-23 11:42           ` Laxman Dewangan
2016-11-24 14:11           ` Linus Walleij
2016-11-24 14:19             ` Laxman Dewangan

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=583580AD.60803@nvidia.com \
    --to=ldewangan-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.