lkml.org 
[lkml]   [2013]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-10-02 22:01    [W:0.377 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site