Hi Hans, On Tue, Dec 19, 2017 at 04:50:19PM +0100, Hans Verkuil wrote: > On 19/12/17 16:39, Akinobu Mita wrote: > > Hi Sakari, > > > > 2017-12-19 19:35 GMT+09:00 Sakari Ailus <sakari.ailus@xxxxxx>: > >> Hi Akinobu, > >> > >> On Thu, Dec 14, 2017 at 01:00:49AM +0900, Akinobu Mita wrote: > >>> This adds support VIDIOC_DBG_G/S_REGISTER ioctls. > >>> > >>> There are many device control registers contained in the OV9650. So > >>> this helps debugging the lower level issues by getting and setting the > >>> registers. > >>> > >>> Cc: Sylwester Nawrocki <sylvester.nawrocki@xxxxxxxxx> > >>> Cc: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > >>> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> > >>> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> > >> > >> Just wondering --- doesn't the I涎 user space interface offer essentially > >> the same functionality? > > > > You are right. I thought /dev/i2c-X interface is not allowed for the > > i2c device that is currently in use by a driver. But I found that > > there is I2C_SLAVE_FORCE ioctl to bypass the check and the i2cget and > > i2cset with '-f' option use I2C_SLAVE_FORCE ioctls. > > > > So I can live without the proposed patch. > > Sakari, there are lots of drivers that use this. There is nothing wrong with > it and it is easier to use than the i2c interface (although that's my opinion). > It certainly is more consistent with other drivers. > > It is also possible to use registernames instead of addresses if the necessary > patch is applied to v4l2-dbg. There are existing generic interfaces that provide the same functionality, in this case without driver changes. With debugfs, you can also use register names if needed. That's why I'm slightly reluctant in supporting s_register and g_register. Let's discuss this on #v4l when you're available. -- Regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx