[PATCH] serial/efm32: parse location property

Linus Walleij linus.walleij at linaro.org
Fri Mar 8 18:04:25 EST 2013


On Thu, Mar 7, 2013 at 10:38 AM, Uwe Kleine-König
<u.kleine-koenig at pengutronix.de> wrote:

> If you have an idea how to model this such that it fits nicely into the
> various subsystems (most interesting: gpio and pinmux), any input is
> welcome.

Looking at it, and assuming you will use device tree for this, I think
the best is to have a single driver in drivers/pinctrl/pinctrl-efm32.c
that handles all muxing, pin direction/biasing/pulling and GPIO.

Let this driver's DT entry reference all the devices with local
MUX registers and pick out these nodes by reference and
manipulate them from the pin control driver.

You put ampersand nodes into the pin controller node.

In the dbx500 pin controller we have this:

                pinctrl {
                        compatible = "stericsson,nmk-pinctrl";
                        prcm = <&prcmu>;
                };

Basically this "prcm" is another peripheral with a set of misc
registers that also do some pin control, but we let the pin control
driver grab a handle to that because they are related.

Yours,
Linus Walleij


More information about the devicetree-discuss mailing list