summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/au0828
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-07 03:46:54 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-10 01:32:00 +0200
commit364d2db2791aa3a808d2590ef62c53b4a83c25dd (patch)
treee58046c05e10a719af2cabe47952b3a7f4f4110d /drivers/media/video/au0828
parent[media] au8522: properly recover from the au8522 delivering misaligned TS str... (diff)
downloadlinux-364d2db2791aa3a808d2590ef62c53b4a83c25dd.tar.xz
linux-364d2db2791aa3a808d2590ef62c53b4a83c25dd.zip
[media] au0828: Make the s_reg and g_reg advanced debug calls work against the bridge
The g_reg and s_reg calls worked properly if acting on subdev registers (such as the au8522), but didn't work against the au0828 itself. Copy the logic over from em28xx. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/au0828')
-rw-r--r--drivers/media/video/au0828/au0828-video.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index ac3dd733ab81..6e30c094c56f 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -1717,8 +1717,12 @@ static int vidioc_g_register(struct file *file, void *priv,
v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg);
return 0;
default:
- return -EINVAL;
+ if (!v4l2_chip_match_host(&reg->match))
+ return -EINVAL;
}
+
+ reg->val = au0828_read(dev, reg->reg);
+ return 0;
}
static int vidioc_s_register(struct file *file, void *priv,
@@ -1732,9 +1736,10 @@ static int vidioc_s_register(struct file *file, void *priv,
v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg);
return 0;
default:
- return -EINVAL;
+ if (!v4l2_chip_match_host(&reg->match))
+ return -EINVAL;
}
- return 0;
+ return au0828_writereg(dev, reg->reg, reg->val);
}
#endif