[PATCH] pxa/hx4700: Reduce sleep mode power consumption by 35%

Haojian Zhuang haojian.zhuang at gmail.com
Wed Mar 14 03:40:54 EDT 2012


On Sun, Mar 11, 2012 at 6:05 AM, Paul Parsons <lost.distance at yahoo.com> wrote:
> --- On Sat, 10/3/12, Russell King - ARM Linux <linux at arm.linux.org.uk> wrote:
>> >      /* BTUART */
>> >      GPIO42_BTUART_RXD,
>> > -    GPIO43_BTUART_TXD,
>> > +    GPIO43_GPIO | MFP_AF2 |
>> MFP_LPM_DRIVE_LOW,
>>
>> I don't believe that's right.
>>
>> This expands to:
>>
>>     MFP_CFG_IN(GPIO43, AF0) | MFP_AF2 |
>> MFP_LPM_DRIVE_LOW
>>
>> and:
>>
>>     (MFP_CFG_DEFAULT & ~(MFP_AF_MASK |
>> MFP_DIR_MASK)) |
>>     (MFP_PIN(MFP_PIN_GPIO43) | MFP_AF0 |
>> MFP_DIR_IN)
>>     | MFP_AF2 | MFP_LPM_DRIVE_LOW
>>
>> Note the presence of both MFP_AF2 and MFP_AF0 in there.
>>
>> The default for GPIO43_BTUART_TXD is:
>>
>>     MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
>>
>> and I'd suggest defining a new GPIO43_BTUART_TXD_LPM_LOW to
>> cover your
>> case.
>
> It wasn't right but it evaluated to the correct value because MFP_AF0 = 0.
> What I intended was: MFP_PIN_GPIO43 | MFP_AF2 | MFP_LPM_DRIVE_LOW
> But I'll add the new values to <mach/mfp-pxa27x.h> if that's preferable.
>
Yes, you can do it. It's prefer to append new values in <mfp-pxa27x.h>.



More information about the linux-arm-kernel mailing list