diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-18 12:16:34 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-25 09:31:05 -0300 |
commit | 79b0c6400517456935f84f8d46c8bb0cf73f1813 (patch) | |
tree | de09f2208cc50a758542546826e784b7cc6783a2 /drivers/media/v4l2-core/v4l2-common.c | |
parent | 820eac0ef8b86f7275acd1f8bccfb0b30f17bbe9 (diff) | |
download | blackbird-op-linux-79b0c6400517456935f84f8d46c8bb0cf73f1813.tar.gz blackbird-op-linux-79b0c6400517456935f84f8d46c8bb0cf73f1813.zip |
[media] v4l2: add new VIDIOC_DBG_G_CHIP_NAME ioctl
Simplify the debugging ioctls by creating the VIDIOC_DBG_G_CHIP_NAME ioctl.
This will eventually replace VIDIOC_DBG_G_CHIP_IDENT. Chip matching is done
by the name or index of subdevices or an index to a bridge chip. Most of this
can all be done automatically, so most drivers just need to provide get/set
register ops.
In particular, it is now possible to get/set subdev registers without
requiring assistance of the bridge driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-common.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index a9e7703560ad..f8fac9cefc3c 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -230,7 +230,7 @@ EXPORT_SYMBOL(v4l2_ctrl_next); int v4l2_chip_match_host(const struct v4l2_dbg_match *match) { switch (match->type) { - case V4L2_CHIP_MATCH_HOST: + case V4L2_CHIP_MATCH_BRIDGE: return match->addr == 0; default: return 0; @@ -254,6 +254,9 @@ int v4l2_chip_match_i2c_client(struct i2c_client *c, const struct v4l2_dbg_match return len && !strncmp(c->driver->driver.name, match->name, len); case V4L2_CHIP_MATCH_I2C_ADDR: return c->addr == match->addr; + case V4L2_CHIP_MATCH_SUBDEV_IDX: + case V4L2_CHIP_MATCH_SUBDEV_NAME: + return 1; default: return 0; } |