Re: pinctrl discussions @ Linaro Connect, and also requesting GPIOs

From: Linus Walleij
Date: Sat Nov 12 2011 - 09:19:54 EST


On Sat, Nov 12, 2011 at 12:22 PM, Thomas Abraham
<thomas.abraham@xxxxxxxxxx> wrote:

> Another question, not related to the above. The gpio and pinctrl
> drivers would operate on the same physical memory space (pinmux and
> gpio is just a single controller). Both gpio and pinctrl driver would
> do a ioremap of this physical address space. I remember reading that
> ioremap of the same physical memory area twice is not correct. So any
> suggestions on how to handle this.

Yes, create one single driver in a single file that presents a pinctrl *and*
a gpiolib interface. Put the driver in drivers/pinctrl/pinctrl-foo.c.
That's the most natural design pattern methinks. Trying to artificially
break it apart in two driver files doesn't make sense.

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/