From mboxrd@z Thu Jan 1 00:00:00 1970 From: anarsoul@gmail.com (Vasily Khoruzhick) Date: Mon, 5 Nov 2012 20:31:45 +0300 Subject: [PATCH 2/5] ARM: PXA: Zipit Z2: Add USB host and device support In-Reply-To: References: <1351438555-4668-1-git-send-email-anarsoul@gmail.com> <1351438555-4668-2-git-send-email-anarsoul@gmail.com> <201210282259.46491.marex@denx.de> <508E4F7F.7010607@gmail.com> <508E5DFB.3060002@gmail.com> <508E61E7.7090502@gmail.com> <508E651A.5070009@gmail.com> <509032F6.1050301@gmail.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, Nov 3, 2012 at 12:29 AM, Vasily Khoruzhick wrote: >> >> I prefer to use pinctrl-single driver instead. I'm updating mmp >> pinctrol driver to >> pinctrl-single driver framework. You can find them in mailist. I'm submitting >> a third round in these days. >> >> Regards >> Haojian > > OK, one more question: > > On PXA2xx GPIO and PINMUX are not separate blocks. Each pin can be > either input or output and have 4 modes (gpio + 3 alternate functions) > == 8 states , so we have: gpio in, gpio out, 3 alt in, 3 alt out. > To control pin mode one should write to GPDR (direction register) and > GAFR (alternate function register). pxa-gpio driver controls both of > those registers, so does pxa2xx-mfp. > > I'm not sure what to do in this case. Should I move code controlling > GPDR and GAFR into some pinctrl-pxa2xx driver, and modify pxa-gpio > driver to use it? > > Regards > Vasily Daniel, Haojian, any suggestion? I'm stuck at the moment, and have no idea how to handle it... pinmux/gpio are connected in hardware and I don't see a way to handle them with 2 separate drivers (gpio and pinmux) in software... Regards Vasily