[PATCH] pinctrl: Add SPEAr pinctrl drivers

Linus Walleij linus.walleij at linaro.org
Tue Apr 3 17:18:47 EDT 2012


On Tue, Apr 3, 2012 at 1:40 PM, Viresh Kumar <viresh.kumar at st.com> wrote:

>  drivers/pinctrl/spear/pinctrl-spear300.c           |  661 ++++
>  drivers/pinctrl/spear/pinctrl-spear310.c           |  384 +++
>  drivers/pinctrl/spear/pinctrl-spear320.c           | 3421 ++++++++++++++++++++
>  drivers/pinctrl/spear/pinctrl-spear3xx.c           |  626 ++++

A lot of data but as we've said, it's OK if you want to do it this way.

> +static struct of_device_id spear_pinctrl_of_match[] __devinitdata = {
> +#ifdef CONFIG_PINCTRL_SPEAR300
> +       {
> +               .compatible = "st,spear300-pinmux",
> +               .data = spear300_mach_init,
> +       },
> +#endif
> +#ifdef CONFIG_PINCTRL_SPEAR310
> +       {
> +               .compatible = "st,spear310-pinmux",
> +               .data = spear310_mach_init,
> +       },
> +#endif
> +#ifdef CONFIG_PINCTRL_SPEAR320
> +       {
> +               .compatible = "st,spear320-pinmux",
> +               .data = spear320_mach_init,
> +       },
> +#endif

Ugh this is not looking good, please check Arnds advice in how to restructure
this a bit... #ifdef is ugly (and error-prone).

Apart from this it looks pretty straight-forward. Make sure to rebase
onto your own patches in linux-next for next version.

Linus Walleij



More information about the linux-arm-kernel mailing list