[PATCH 2/5] ARM: PXA: Zipit Z2: Add USB host and device support
Haojian Zhuang
haojian.zhuang at gmail.com
Tue Dec 4 03:30:28 EST 2012
On Tue, Nov 6, 2012 at 1:31 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> On Sat, Nov 3, 2012 at 12:29 AM, Vasily Khoruzhick <anarsoul at gmail.com> 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
I checked the PXA25x spec. pinmux functions are contained in gpio registers.
It doesn't matter. You can still you pinmux register. You only need to control
GAFP in pinmux driver.
More information about the linux-arm-kernel
mailing list