From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "lrg@ti.com" <lrg@ti.com>,
"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
"rob@landley.net" <rob@landley.net>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] regulator: fixed: dt: support for input supply
Date: Wed, 4 Jul 2012 12:32:08 +0530 [thread overview]
Message-ID: <4FF3EA70.307@nvidia.com> (raw)
In-Reply-To: <20120703191704.GE29030@opensource.wolfsonmicro.com>
On Wednesday 04 July 2012 12:47 AM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Mon, Jul 02, 2012 at 03:37:25PM +0530, Laxman Dewangan wrote:
>
>> + if (vin_supply)
>> + drvdata->desc.supply_name = "vin";
>> +
> This isn't great both in terms of it being conditional and the fact that
> it's only usable on DT systems as there's no non-DT way to do this. In
> general unless we're working around some device tree issue (which should
> be *very* rare) we shouldn't be adding any DT only stuff to generic
> code, we need to be able to run Linux on non-DT systems.
>
In non-DT, the input supply is passed with the regulator_init_data
through the fixed voltage config and it is filled in board files.
In one of discussion on input supply in my old patch, I understand that
we should not provide the supply_regulator through the init_data as it
is legacy and should provide with desc->supply_name.
so matching with this I have this change and put th supply regulator in
desc->supply_name.
If we want to keep the same as DT and non-DT and not the extra care for
this new policy then we can put the parsing code in
of_get_fixed_voltage_config() and just fill the
config->init_data->supply_regulator in this function.
The property checking for vin-supply can be done in this function only
and set the config->init_data->supply_regulator = "vin" accordingly.
In this way there is no code for DT/Non-DT case.
Let me know your opinion.
next prev parent reply other threads:[~2012-07-04 7:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 10:07 [PATCH 1/2] regulator: fixed: use devm_* for gpio request Laxman Dewangan
2012-07-02 10:07 ` Laxman Dewangan
2012-07-02 10:07 ` [PATCH 2/2] regulator: fixed: dt: support for input supply Laxman Dewangan
2012-07-02 10:07 ` Laxman Dewangan
2012-07-03 19:17 ` Mark Brown
2012-07-04 7:02 ` Laxman Dewangan [this message]
2012-07-04 10:21 ` Mark Brown
2012-07-04 10:42 ` Laxman Dewangan
[not found] ` <4FF41E2D.30104-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-04 10:58 ` Mark Brown
2012-07-04 10:58 ` Mark Brown
2012-07-02 17:29 ` [PATCH 1/2] regulator: fixed: use devm_* for gpio request Mark Brown
2012-07-03 8:48 ` 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=4FF3EA70.307@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
/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.