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

From: Linus Walleij
Date: Thu May 10 2012 - 11:12:04 EST

Then it's probably a good idea to actually loop in Arnd too...
sorry for missing it!

On Thu, May 10, 2012 at 5:10 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Wed, May 9, 2012 at 10:34 PM, Stephen Warren <swarren@xxxxxxxxxxxxx> wrote:

>>> +static int __devinit nmk_pinctrl_probe(struct platform_device *pdev)
>>> +     /* 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?
> Of course I could do it that way, but it's not using this feature
> of the driver base to have a string identifier telling which version
> it is.
> Since I'm unsure, let's ask Arnd.
> Arnd, what is your preferred design pattern of:
> A) sub-drivers that register one struct platform_driver per
>  variant, then calls into a shared core driver, or
> B) a shared core driver registering one platform_driver
>  with several struct platform_device_id that then call
>  sub-drivers depending on which one is found
> Either way is actually OK for me, but I was thinking if one
> is preferred over the other.
> Yours,
> Linus Walleij

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
Please read the FAQ at