[PATCH Resend] ARM: pxa27x: fix ac97 controller warm reset code
Mike Dunn
mikedunn at newsguy.com
Mon Dec 31 16:04:14 EST 2012
On 12/31/2012 01:56 AM, Igor Grinberg wrote:
> On 12/28/12 23:06, Mike Dunn wrote:
[..]
>>
>> static unsigned long ac97_reset_config[] = {
>> - GPIO113_GPIO,
>> + MFP_CFG_OUT(GPIO113, AF0, DRIVE_HIGH),
>> GPIO113_AC97_nRESET,
>> - GPIO95_GPIO,
>> + MFP_CFG_OUT(GPIO95, AF0, DRIVE_HIGH),
>
> It was always discouraged to code the above directly.
Had a funny feeling about that when I coded it... I should have heeded the
feeling instead of being hasty.
> How about one of the below:
> 1)
> GPIO113_GPIO | MFP_PULL_HIGH,
> GPIO95_GPIO | MFP_PULL_HIGH,
>
> or
>
> 2) introduce something like:
> GPIO113_AC97_nRESET_GPIO_HIGH
> GPIO95_AC97_nRESET_GPIO_HIGH
> in the mfp-pxa27x.h file and use them in the structure above.
OK, will implement your suggestion and resubmit. To me, your first option seems
clearer to the casual reader.
Thanks Igor,
Mike
More information about the linux-arm-kernel
mailing list