[PATCH 1/3] ezx: Add camera support for A780 and A910 EZX phones

Eric Miao eric.y.miao at gmail.com
Tue Nov 10 10:13:28 EST 2009


On Tue, Nov 10, 2009 at 8:48 PM, Antonio Ospite
<ospite at studenti.unina.it> wrote:
> On Wed, 4 Nov 2009 14:38:40 +0800
> Eric Miao <eric.y.miao at gmail.com> wrote:
>
>> Hi Antonio,
>>
>> Patch looks generally OK except for the MFP/GPIO usage...
>
> Eric,
>
> while I was at it I also checked the original code Motorola released.
>
> It has:
>     PGSR(GPIO_CAM_EN) |= GPIO_bit(GPIO_CAM_EN);
>     PGSR(GPIO_CAM_RST)|= GPIO_bit(GPIO_CAM_RST);
>
> After checking PXA manual and arch/arm/mach-pxa/mfp-pxa2xx.c,
> I'd translate this to:
>
> diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
> index 77286a2..6a47a9d 100644
> --- a/arch/arm/mach-pxa/ezx.c
> +++ b/arch/arm/mach-pxa/ezx.c
> @@ -281,8 +281,8 @@ static unsigned long gen1_pin_config[] __initdata = {
>        GPIO94_CIF_DD_5,
>        GPIO17_CIF_DD_6,
>        GPIO108_CIF_DD_7,
> -       GPIO50_GPIO,                            /* CAM_EN */
> -       GPIO19_GPIO,                            /* CAM_RST */
> +       GPIO50_GPIO | MFP_LPM_DRIVE_HIGH,       /* CAM_EN */
> +       GPIO19_GPIO | MFP_LPM_DRIVE_HIGH,       /* CAM_RST */
>
>        /* EMU */
>        GPIO120_GPIO,                           /* EMU_MUX1 */
> @@ -338,8 +338,8 @@ static unsigned long gen2_pin_config[] __initdata = {
>        GPIO48_CIF_DD_5,
>        GPIO93_CIF_DD_6,
>        GPIO12_CIF_DD_7,
> -       GPIO50_GPIO,                            /* CAM_EN */
> -       GPIO28_GPIO,                            /* CAM_RST */
> +       GPIO50_GPIO | MFP_LPM_DRIVE_HIGH,       /* CAM_EN */
> +       GPIO28_GPIO | MFP_LPM_DRIVE_HIGH,       /* CAM_RST */
>        GPIO17_GPIO,                            /* CAM_FLASH */
>  };
>  #endif
>
>
> Is that right?

That's right.

> I am putting also this into the next version I am going to send for
> submission, if you don't object.

No I won't, feel free to.



More information about the linux-arm-kernel mailing list