[PATCH v4 8/8] ARM: pxa: move macros into gpio-pxa.c

Eric Miao eric.y.miao at gmail.com
Fri Oct 14 05:15:28 EDT 2011


On Fri, Oct 14, 2011 at 5:13 PM, Haojian Zhuang
<haojian.zhuang at gmail.com> wrote:
> On Fri, Oct 14, 2011 at 2:17 PM, Eric Miao <eric.y.miao at gmail.com> wrote:
>>>
>>>> +enum pxa_gpios {
>>>> +     PXA_GPLR = 0x00,        /* GPIO Pin Level Registers */
>>>> +     PXA_GPDR = 0x0C,        /* GPIO Pin Direction Registers */
>>>> +     PXA_GPSR = 0x18,        /* GPIO Pin Output Set Registers */
>>>> +     PXA_GPCR = 0x24,        /* GPIO Pin Output Clear Registers */
>>>> +     PXA_GRER = 0x30,        /* GPIO Rising Edge Detect Registers */
>>>> +     PXA_GFER = 0x3C,        /* GPIO Falling Edge Detect Registers */
>>>> +     PXA_GEDR = 0x48,        /* GPIO Edge Detect Status Registers */
>>>> +     PXA_GAFR = 0x54,        /* GPIO Alternate Function Select Registers */
>>>> +     PXA_ED_MASK = 0x9C,     /* GPIO edge detection for AP side */
>>>> +};
>>
>> And Haojian,
>>
>> Is this is completely for the GPIO driver's internal use, I'd prefer to
>> use GPxR names directly, instead of prefixing it with PXA_, that's a
>> bit ugly from my picky point of view.
>>
>
> OK, I'll GPxR directly. And I'll keep PXA_GPIO_bit() to avoid
> potential name issue.
>

I think GPIO_bit() is just fine if it's only used in gpio-pxa.c. I do
prefer to have PXA_* prefixes as less as possible unless absolutely
necessary.



More information about the linux-arm-kernel mailing list