aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/soc_camera
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 22:22:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 22:22:22 -0500
commitd8c532c40721f7507896d202b8cae3b3642d2b0d (patch)
tree42b1ce76671eb85324281ed93491432f4523f983 /drivers/media/platform/soc_camera
parente777d192ffb9f2929d547a2f8a5f65b7db7a9552 (diff)
parent77c53d0b56264a8fc5844e087ad15fffe20c299d (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Missing MAINTAINERS entries were added for several drivers - Adds V4L2 support for DMABUF handling, allowing zero-copy buffer sharing between V4L2 devices and GPU - Got rid of all warnings when compiling with W=1 on x86 - Add a new driver for Exynos hardware (s3c-camif) - Several bug fixes, cleanups and driver improvements * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (243 commits) [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check [media] omap3isp: Prepare/unprepare clocks before/after enable/disable [media] omap3isp: preview: Add support for 8-bit formats at the sink pad [media] omap3isp: Replace printk with dev_* [media] omap3isp: Find source pad from external entity [media] omap3isp: Configure CSI-2 phy based on platform data [media] omap3isp: Add PHY routing configuration [media] omap3isp: Add CSI configuration registers from control block to ISP resources [media] omap3isp: Remove unneeded module memory address definitions [media] omap3isp: Use monotonic timestamps for statistics buffers [media] uvcvideo: Fix control value clamping for unsigned integer controls [media] uvcvideo: Mark first output terminal as default video node [media] uvcvideo: Add VIDIOC_[GS]_PRIORITY support [media] uvcvideo: Return -ENOTTY for unsupported ioctls [media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP [media] uvcvideo: Don't fail when an unsupported format is requested [media] uvcvideo: Return -EACCES when trying to access a read/write-only control [media] uvcvideo: Set error_idx properly for extended controls API failures [media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2 [media] fc2580: write some registers conditionally ...
Diffstat (limited to 'drivers/media/platform/soc_camera')
-rw-r--r--drivers/media/platform/soc_camera/Kconfig1
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c14
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/platform/soc_camera/Kconfig b/drivers/media/platform/soc_camera/Kconfig
index 9afe1e7bde74..cb6791e62bd4 100644
--- a/drivers/media/platform/soc_camera/Kconfig
+++ b/drivers/media/platform/soc_camera/Kconfig
@@ -19,6 +19,7 @@ config MX1_VIDEO
19 19
20config VIDEO_MX1 20config VIDEO_MX1
21 tristate "i.MX1/i.MXL CMOS Sensor Interface driver" 21 tristate "i.MX1/i.MXL CMOS Sensor Interface driver"
22 depends on BROKEN
22 depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA 23 depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA
23 select FIQ 24 select FIQ
24 select VIDEOBUF_DMA_CONTIG 25 select VIDEOBUF_DMA_CONTIG
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index d3f0b84e2d70..4e3735679f17 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -645,11 +645,17 @@ static ssize_t soc_camera_read(struct file *file, char __user *buf,
645 size_t count, loff_t *ppos) 645 size_t count, loff_t *ppos)
646{ 646{
647 struct soc_camera_device *icd = file->private_data; 647 struct soc_camera_device *icd = file->private_data;
648 int err = -EINVAL; 648 struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
649
650 dev_dbg(icd->pdev, "read called, buf %p\n", buf);
651
652 if (ici->ops->init_videobuf2 && icd->vb2_vidq.io_modes & VB2_READ)
653 return vb2_read(&icd->vb2_vidq, buf, count, ppos,
654 file->f_flags & O_NONBLOCK);
649 655
650 dev_err(icd->pdev, "camera device read not implemented\n"); 656 dev_err(icd->pdev, "camera device read not implemented\n");
651 657
652 return err; 658 return -EINVAL;
653} 659}
654 660
655static int soc_camera_mmap(struct file *file, struct vm_area_struct *vma) 661static int soc_camera_mmap(struct file *file, struct vm_area_struct *vma)
@@ -1048,10 +1054,8 @@ static void scan_add_host(struct soc_camera_host *ici)
1048 1054
1049 list_for_each_entry(icd, &devices, list) { 1055 list_for_each_entry(icd, &devices, list) {
1050 if (icd->iface == ici->nr) { 1056 if (icd->iface == ici->nr) {
1051 int ret;
1052
1053 icd->parent = ici->v4l2_dev.dev; 1057 icd->parent = ici->v4l2_dev.dev;
1054 ret = soc_camera_probe(icd); 1058 soc_camera_probe(icd);
1055 } 1059 }
1056 } 1060 }
1057 1061