From: Hans Verkuil <hans.verk...@cisco.com>

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
---
 drivers/media/pci/ivtv/ivtv-ioctl.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c 
b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 9cbbce0..f9162aa 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -762,6 +762,24 @@ static int ivtv_s_register(struct file *file, void *fh, 
const struct v4l2_dbg_re
        ivtv_call_all(itv, core, s_register, reg);
        return 0;
 }
+
+static int ivtv_g_chip_info(struct file *file, void *fh, struct 
v4l2_dbg_chip_info *chip)
+{
+       struct ivtv *itv = fh2id(fh)->itv;
+
+       if (chip->match.addr || chip->range > (itv->has_cx23415 ? 1 : 0))
+               return -EINVAL;
+       if (chip->range == 0) {
+               strlcpy(chip->range_name, "cx23416", sizeof(chip->range_name));
+               chip->range_start = IVTV_REG_OFFSET;
+               chip->range_size = IVTV_REG_SIZE;
+       } else {
+               strlcpy(chip->range_name, "cx23415", sizeof(chip->range_name));
+               chip->range_start = IVTV_DECODER_OFFSET;
+               chip->range_size = IVTV_DECODER_SIZE;
+       }
+       return 0;
+}
 #endif
 
 static int ivtv_querycap(struct file *file, void *fh, struct v4l2_capability 
*vcap)
@@ -1916,6 +1934,7 @@ static const struct v4l2_ioctl_ops ivtv_ioctl_ops = {
        .vidioc_g_sliced_vbi_cap            = ivtv_g_sliced_vbi_cap,
        .vidioc_g_chip_ident                = ivtv_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
+       .vidioc_g_chip_info                 = ivtv_g_chip_info,
        .vidioc_g_register                  = ivtv_g_register,
        .vidioc_s_register                  = ivtv_s_register,
 #endif
-- 
1.7.10.4

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

Reply via email to