From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sascha Hauer Date: Fri, 28 Oct 2011 20:33:53 +0000 Subject: Re: [PATCH 2/2 v3] net/smsc911x: Add regulator support Message-Id: <20111028203353.GE23421@pengutronix.de> List-Id: References: <1319719691-15799-1-git-send-email-linus.walleij@stericsson.com> In-Reply-To: <1319719691-15799-1-git-send-email-linus.walleij@stericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Walleij Cc: netdev@vger.kernel.org, Steve Glendinning , Mathieu Poirer , Robert Marklund , Paul Mundt , linux-sh@vger.kernel.org, Tony Lindgren , linux-omap@vger.kernel.org, Mike Frysinger , uclinux-dist-devel@blackfin.uclinux.org, Linus Walleij Hi Linus, On Thu, Oct 27, 2011 at 02:48:11PM +0200, Linus Walleij wrote: > From: Robert Marklund > > Add some basic regulator support for the power pins, as needed > by the ST-Ericsson Snowball platform that powers up the SMSC911 > chip using an external regulator. > > Platforms that use regulators and the smsc911x and have no defined > regulator for the smsc911x and claim complete regulator > constraints with no dummy regulators will need to provide it, for > example using a fixed voltage regulator. It appears that this may > affect (apart from Ux500 Snowball) possibly these archs/machines > that from some grep:s appear to define both CONFIG_SMSC911X and > CONFIG_REGULATOR: > > - ARM Freescale mx3 and OMAP 2 plus, Raumfeld machines > - Blackfin > - Super-H > ... > > + > +/* > + * Request or free resources, currently just regulators. > + * > + * The SMSC911x has two power pins: vddvario and vdd33a, in designs where > + * these are not always-on we need to request regulators to be turned on > + * before we can try to access the device registers. > + */ > +static int smsc911x_request_free_resources(struct platform_device *pdev, > + bool request) I had to look twice at this function name. First I thought "request the free resources?", which other resources would you request if not the free ones? I think it would be nicer to have two functions instead. Just my 2 cents. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |