1 Dec 2008 01:38
Re: [PATCH] Add ov7725 ov7720 support to ov772x driver
<morimoto.kuninori <at> renesas.com>
2008-12-01 00:38:14 GMT
2008-12-01 00:38:14 GMT
Dear Guennadi
Thank you for checking patch.
> > <at> <at> -837,15 +859,16 <at> <at> static int ov772x_video_probe(struct soc_camera_device *icd)
> > */
> > pid = i2c_smbus_read_byte_data(priv->client, PID);
> > ver = i2c_smbus_read_byte_data(priv->client, VER);
> > - if (pid != 0x77 ||
> > - ver != 0x21) {
> > + if (pid != GET_PID(priv->id->driver_data) ||
> > + ver != GET_VER(priv->id->driver_data)) {
> > dev_err(&icd->dev,
> > "Product ID error %x:%x\n", pid, ver);
> > return -ENODEV;
> > }
>
> this means, you can indeed probe the exact type of the camera - 7720 vs.
> 7725, right? Then why do you require the platform code to also specify
> exactly which camera is connected? Why don't you leave the platform code
> at the old requirement, i.e., it should just register an i2c device of
> type "ov772x" and then detect yourself what exactly sensor is there? This
> is what I've done in mt9m001 and mt9v022. They both support several sensor
> variants too. This way you can use one kernel for all compatible cameras.
> If there is no real reason not to do the same in ov772x, I would suggest
> you switch it over to autoprobing.
Indeed, it is not necessary to specify it accurately.
Sorry about it.
(Continue reading)
RSS Feed