-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Mike 
Frysinger
Sent: Thursday, June 30, 2011 4:40 AM
To: Scott Jiang
Cc: [email protected]
Subject: Re: [Linux-kernel-commits] [#4377] v4l2: add ppi control flags

On Wed, Jun 29, 2011 at 19:12, Scott Jiang wrote:
> +             intf->ppi_control = 0x0002;

> these magic numbers really need to be defines.  i'll probably merge
> the toolchain/trunk/proc-defs/header-frags/regbits/ppi.h header file
> into asm/bfin_ppi.h, then you can replace all of this logic with that.

Yes, some macros are defined in mach/defBF5xx.h, but not complete
We'd better put all these macros together.

> +             /* set xfer type */
> +             if (!(params->flags & PPI_FLAG_NO_SYNC))
> +                     intf->ppi_control |= 0x000c;
> +             /* set port cfg */
> +             else if (params->flags & PPI_FLAG_ONE_SYNC)
> +                     intf->ppi_control |= 0x0000;
> +             else if (params->flags & PPI_FLAG_FS2_ASSERT)
> +                     intf->ppi_control |= 0x0030;
> +             else
> +                     intf->ppi_control |= 0x0010;

> do we really need to have this abstraction ?  why dont we just let
> users program the ppi_control directly via the board config.

Because eppi has different register bit. If we use bit flag, ppi or eppi driver 
can convert this.
That means one sensor configuration can be used both on ppi and eppi.
Perhaps it is no use, I can remove it.
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits


_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to