From: Hans Verkuil Date: Sat, 4 Aug 2007 08:06:23 +0000 (-0300) Subject: V4L/DVB (5994): ivtv: make VIDIOC_INT_RESET support smarter. X-Git-Tag: v2.6.24-rc1~1463^2~241 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cc720957a743ef59f9925ecfef5f71f08387d8b;p=linux-2.6 V4L/DVB (5994): ivtv: make VIDIOC_INT_RESET support smarter. Add support to optionally reset the IR and/or the video digitizer. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 85e6a34d5e..cee6c558c6 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c @@ -681,9 +681,17 @@ static int ivtv_debug_ioctls(struct file *filp, unsigned int cmd, void *arg) break; } - case VIDIOC_INT_RESET: - ivtv_reset_ir_gpio(itv); + case VIDIOC_INT_RESET: { + u32 val = *(u32 *)arg; + + if ((val == 0 && itv->options.newi2c) || (val & 0x01)) { + ivtv_reset_ir_gpio(itv); + } + if (val & 0x02) { + itv->video_dec_func(itv, cmd, 0); + } break; + } default: return -EINVAL;