Re: [RFC] Refactor the cafe_ccic driver and add Armada 610 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Jun 2011 13:30:11 +0800
Kassey Lee <kassey1216@xxxxxxxxx> wrote:

>       1)  this driver is still based on cafe_ccic.c, as you said, we
> can abstract the low level register function, and use soc_camera and
> videofbu2 to manage the buff and state machine,  how do you think ?

As I said, videobuf2 is on my list of things to do.  Note that the driver
works just fine without - that code has been in the kernel and working for
years.  But it's a cleanup that needs to be done at this point, and I will
do it.

>       2) i2c_adapter, how about move this code to driver/i2c, then
> ccic driver will become clean?

The problem there is that you can't easily disentangle the two devices -
they use the same registers, the same IRQ line, etc.  One *could* turn the
whole thing into an MFD driver and split them apart, but I honestly don't
see a reason to do that.  I'd be surprised if a Cafe chip ever shows up in
anything new these days, so it's only used in the OLPC XO 1, and that i2c
will never be used for anything but the sensor.

The i2c *has* been abstracted out of the camera core, so the Cafe i2c
implementation will not get in the way of any new drivers.

>       3) in mmp_driver.c, it has the sensor name, OV7670,  we wish
> that ccic driver do not need to aware of the sensor, also we need to
> support front and back camera sensor cases.

The only reason the ov7670 dependency is there is because that's the only
sensor the driver has ever been used with.  Adding other sensors has been
complicated a bit by Hans's changes which pushed awareness of the
available video formats into the controller driver (I complained at the
time), but that can be worked around.

For front and back: I didn't wire up the second controller in the mmp
driver because I don't have a device that uses both.  I very much wrote
the driver with the idea that both controllers could be used, though;
finishing that job will be easy.

One thing I haven't done is to look at your driver closely enough to think
about whether mmp_camera can drive your hardware or not.  You'll have a
better idea of that than me, I suspect; is the hardware pretty much the
same?

Thanks,

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux