[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EA7D1F5.2030904@stericsson.com>
Date: Wed, 26 Oct 2011 11:25:09 +0200
From: Linus Walleij <linus.walleij@...ricsson.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Steve Glendinning <steve.glendinning@...c.com>,
Mathieu Poirer <mathieu.poirier@...aro.org>,
Robert MARKLUND <robert.marklund@...ricsson.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 2/2] net/smsc911x: Add regulator support
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists