Re: [PATCH v4 1/3] pinctrl: enable pinmux for mmp series

From: Linus Walleij
Date: Tue Jan 10 2012 - 04:13:48 EST


On Wed, Jan 4, 2012 at 3:26 AM, Haojian Zhuang
<haojian.zhuang@xxxxxxxxxxx> wrote:

> Support PXA168/PXA910/MMP2 pinmux. Now only support function switch.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@xxxxxxxxxxx>

I've applied this to my devel branch. It's pretty huge but since it's
split over three files I guess I can live with it. I can also see that
you have really made an effort to cover the PXA variants and
these drivers give a real good abstraction and understanding of
this muxing hardware so WELL DONE!

I fixed a number of whitespace issues, so please base your further
work upon my tree (once it emerges after the merge window).

I also removed the .maxpin on all pinctrl_desc:s, since that is
gone now, we get the max pin from the pin list instead, so it's
self-describing.

When I see things like this:

PINCTRL_PIN(GPIO0, "GPIO0"),
PINCTRL_PIN(GPIO1, "GPIO1"),
PINCTRL_PIN(GPIO2, "GPIO2"),
PINCTRL_PIN(GPIO3, "GPIO3"),
PINCTRL_PIN(GPIO4, "GPIO4"),
PINCTRL_PIN(GPIO5, "GPIO5"),

I wish I could have loops in the preprocessor and just
PINCTRL_PIN_RANGE("GPIO", start, end)
but sadly I can't. So as mentioned earlier we might go for
some static inline helper that can generate that array before you
assign it to your pin controller.

Maybe the device tree is the answer to everything (as usual). Given the
time it seems to take to find consensus around DT stuff we might just
have to wait and see.

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/