netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@stericsson.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Steve Glendinning <steve.glendinning@smsc.com>,
	Mathieu Poirer <mathieu.poirier@linaro.org>,
	Robert MARKLUND <robert.marklund@stericsson.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 2/2] net/smsc911x: Add regulator support
Date: Wed, 26 Oct 2011 11:25:09 +0200	[thread overview]
Message-ID: <4EA7D1F5.2030904@stericsson.com> (raw)
In-Reply-To: <20111026083838.GA9157@opensource.wolfsonmicro.com>

On 10/26/2011 10:38 AM, Mark Brown wrote:
> On Wed, Oct 26, 2011 at 10:05:56AM +0200, Linus Walleij wrote:
>
>    
>> +	/* enable/disable regulator for vddvario */
>> +	if (pdata->regulator_vddvario) {
>>      
> This has the same issue as last time - if you've got conditional code
> like this in the body of the driver something is going wrong.  Unless
> the supply is genuinely optional and might not be physically present on
> some systems the driver should fail if it can't get it.  The regulator
> API will stub itself out when not in use.
>    

That solves the issue for platforms with no regulator
support at all.

Then we have platforms with regulator support, but no
regulator for this hardware, because that one happens
to be always-on in these systems.

And they do not have CONFIG_REGULATOR_DUMMY
either.

So the driver probe will fail.

How do we solve this?

Shall we have CONFIG_SMC911X select
REGULATOR_DUMMY?

Yours,
Linus Walleij

  reply	other threads:[~2011-10-26  9:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26  8:05 [PATCH 2/2] net/smsc911x: Add regulator support Linus Walleij
2011-10-26  8:38 ` Mark Brown
2011-10-26  9:25   ` Linus Walleij [this message]
2011-10-26 10:17     ` Mark Brown
2011-10-26 10:44       ` Linus Walleij
2011-10-26 12:48         ` Mark Brown
2011-10-26 10:57   ` Robert MARKLUND

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=4EA7D1F5.2030904@stericsson.com \
    --to=linus.walleij@stericsson.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linus.walleij@linaro.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert.marklund@stericsson.com \
    --cc=steve.glendinning@smsc.com \
    /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).