Saturday, August 22, 2009

OmniVision OV9640 hacking - part IV

I recently had some talk with Guennadi Liakhovetski (aka. the soc-camera maintainer and v4l2 guru) about this driver. He pointed out that there will certainly be a large amount of changes going into 2.6.32 affecting the soc-camera API and advised me to prepare the driver for those. Besides that, we found out there are certain differences between OV9640 and OV9650, so support for the later one was dropped (it was never tested anyway). For that model there's another driver scheduled for merge written by Stefan Herbrechtsmeier. Subsequent changes are mostly because of the API change. There are also some minor cleanups and changes in logic of the driver.

The patch got split into three separate patches, but prior to applying those, you need to apply a patchset available here (LINK) on top of linux-next (in case you run into merge issues, git reset --hard to commit hash in 0000-base) . The OV9640 patches are then available here:
  • Patch adding support for RGB555X and RGB565X formats into pxa-camera (LINK)
  • OV9640 support adding patch (LINK)
  • Patch adding support for the camera into PalmZ72 platform file (LINK)

1 comment:

Alan Carvalho de Assis said...

Hi,

I found an issue in your driver:

if (!icd->dev.parent || to_soc_camera_host(icd->dev.parent)->nr != icd->iface)

Please replace || by && to validate against a NULL pointer on to_soc_camera_host function.

Best Regards,

Alan