Re: [PATCH v3] leds: Add MAX6956 driver

From: Linus Walleij
Date: Fri May 25 2012 - 02:55:11 EST


On Thu, May 24, 2012 at 6:17 PM, Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> On Mon, May 21, 2012 at 11:30:28PM +0200, Linus Walleij wrote:

>> The MFD driver decide using platform data whether each
>> line should be used for a LED or GPIO.
>>
>> Is there some problem with this design pattern?
>
> I thought about that, too, but I think it's overkill to create an mfd
> driver.

I have this driver:
drivers/mfd/tps6105x.c
drivers/regulator/tps6105x-regulator.c

It's not much code either but it has this nice split.

Discussing this in the past with Mark Brown we have often come
to the conclusion that having the MFD abstraction for multifunctional
chips is rather nice. But it's partly a question of aesthetics and I'm
not a perfectionist, there are indeed many examples to the contrary.

But this is what I would have done...

BTW: you need to include Andrew Morton in the postings since he's
merging most LED code these days.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/