Re: [PATCH 13/23] mfd/db5500-prcmu: update mailbox handling

From: Linus Walleij
Date: Wed Oct 05 2011 - 12:57:30 EST


On Mon, Oct 3, 2011 at 5:53 PM, Samuel Ortiz <sameo@xxxxxxxxxxxxxxx> wrote:
> On Fri, Aug 12, 2011 at 10:29:20AM +0200, Linus Walleij wrote:
>> From: Shreshtha Kumar Sahu <shreshthakumar.sahu@xxxxxxxxxxxxxx>
>>
>> This updates the mailbox handling to be more robust and
>> adds basic infrastructure for event (IRQ) handling.
>
> This patch and the next one (#14) adds 500 lines of code but I have the
> feeling a lot of it could be shared between 8500 and 5500. What are your plans
> for that ?

I've tried to locate similarities, but it's quite hard. The drivers reflect
the fact that they are talking to software, which is reengineered for
each SoC produced.

So for example if I take a common function like
u*500_prcmu_set_power_state() you can see that they write very
different things into very different mailboxes.

I do look for similarities and try to find some pattern, and I also
think some vtable scheme for switching between the implementations
could be good.

If you think there is too much functional growth and too little
consolidation from patch 13 onwards (i.e. the DB5500 stuff) then
feel free to stop applying at this point.

I think the two fixup patches I just sent out can apply on top of
patch 12 or so anyway, maybe with some patch -p1 <
to avoid patching the clock control in db5500-prcmu.c.

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/