[PATCH] mfd: convert devicetree to platform data on max8925

Grant Likely grant.likely at secretlab.ca
Sun Jul 10 06:40:32 EDT 2011


On Sun, Jul 10, 2011 at 6:17 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Sun, Jul 10, 2011 at 04:20:27PM +0900, Grant Likely wrote:
>> On Fri, Jul 08, 2011 at 06:20:26PM +0800, Haojian Zhuang wrote:
>
>> > +   if (pdata == NULL)
>> > +           return NULL;
>> > +   pdata->regulator[0] = kzalloc(sizeof(struct regulator_init_data)
>> > +                   * MAX8925_MAX_REGULATOR, GFP_KERNEL);
>
>> ditto.
>
>> Is it appropriate to allocated the entire table of regulators?  From
>> the parse_regulator function above, it looks like only one of the
>> regulators will actually get registered (I've not dug deeply into what
>> the driver needs here though).
>
> If the code/binding doesn't allow the use of all the regulators on the
> device the code is probably wrong, it'd be very unusual to have hardware
> like that.

I was wondering about that.  I was just going by what I could
understand of the code.

g.



More information about the linux-arm-kernel mailing list