[PATCH 02/12] pinctrl: basic Nomadik pinctrl interface

Linus Walleij linus.walleij at linaro.org
Fri May 11 03:12:50 EDT 2012


On Wed, May 9, 2012 at 10:34 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 05/08/2012 03:44 AM, Linus Walleij wrote:

>> +     /* Poke in other ASIC variants here */
>> +     if (platid->driver_data == PINCTRL_NMK_DB8500)
>> +             nmk_pinctrl_db8500_init(&npct->soc);
>
> Other platforms have a unique top-level driver for each variant, with
> the probe() function for each variant calling into a utility function.
> That way, the common/utility code doesn't need to contain a
> table/list/... of all the variants. Can the same approach be used here?

Now I see why I did this, it doesn't show in the patch but this driver
now has two platform_driver structs and two probes.

So I thought it'd be messy to have the two probes in two different
files, with criss-cross calling, as simple as that.

The goal is to merge them into one probe function providing
all resources though, I'm refactoring stepwise since the mess
up in the arch needs to be handled in some separate step
and I have enough hamming distance already as it is ...

I'm rolling a v2 with the other change though.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list