[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131002195029.GH27287@sirena.org.uk>
Date: Wed, 2 Oct 2013 20:50:29 +0100
From: Mark Brown <broonie@...nel.org>
To: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
Cc: lgirdwood@...il.com, linux-kernel@...r.kernel.org,
patches@...nsource.wolfsonmicro.com
Subject: Re: [RFC PATCH] regulator: core: Add ability to create a lookup
alias for supply
On Wed, Oct 02, 2013 at 01:16:59PM +0100, Charles Keepax wrote:
> Following our discussions around the Arizona regulator
> bindings here is an effort at putting a mechanism into the
> regulator core to alias registering of a supply from one
> device to another.
This seems basically fine, though I do have a few comments below.
Bulk versions of the API would also make sense - it's likely that more
than one supply will need to be mapped - and please also add managed
versions so people don't have to write cleanup code.
> I have a couple of patches that update the Arizona driver to
> use this that I will send in if you think this looks along
> the lines of what you were suggesting.
This seems like someting that should be in the MFD core, or at least
that there should be helpers in the core. Something like a set of
mappings in the mfd_cell so it's all data to the drivers.
> + struct device *dev;
> + const char *supply;
> + struct device *alias;
Please use a more meaningful name for dev. It might also be worth
allowing rewriting of the supply name since we'll probably find other
applications for things like modular board designs where name rewriting
is useful; since it's a function call with a parameter list it's harder
to add later than it would be with a struct.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists