diff options
author | Jonathan Corbet <corbet@lwn.net> | 2010-10-19 21:32:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 13:45:28 -0200 |
commit | 024fafbac36b176d978ccd0fb1cae1fbc38c7fee (patch) | |
tree | 02b52bf8c6104ab4a8f7bcdf87741aee4b219f3b /drivers/video | |
parent | dc4589c814a3a50a4cfc2077690fc7fd397308c8 (diff) |
[media] Add the via framebuffer camera controller driver
Add a driver for the video capture port on VIA integrated chipsets. This
version has a remaining OLPCism or two and expects to be talking to an
ov7670; those can be improved as the need arises.
This work was supported by the One Laptop Per Child project.
Thanks to Laurent Pinchart for a number of useful comments.
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/via/accel.c | 2 | ||||
-rw-r--r-- | drivers/video/via/via-core.c | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c index e44893ea590..04bec058569 100644 --- a/drivers/video/via/accel.c +++ b/drivers/video/via/accel.c @@ -370,7 +370,7 @@ int viafb_init_engine(struct fb_info *info) viapar->shared->vq_vram_addr = viapar->fbmem_free; viapar->fbmem_used += VQ_SIZE; -#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE) +#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE) /* * Set aside a chunk of framebuffer memory for the camera * driver. Someday this driver probably needs a proper allocator diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c index 66f40303311..27d7260d4f5 100644 --- a/drivers/video/via/via-core.c +++ b/drivers/video/via/via-core.c @@ -95,6 +95,13 @@ EXPORT_SYMBOL_GPL(viafb_irq_disable); /* ---------------------------------------------------------------------- */ /* + * Currently, the camera driver is the only user of the DMA code, so we + * only compile it in if the camera driver is being built. Chances are, + * most viafb systems will not need to have this extra code for a while. + * As soon as another user comes long, the ifdef can be removed. + */ +#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE) +/* * Access to the DMA engine. This currently provides what the camera * driver needs (i.e. outgoing only) but is easily expandable if need * be. @@ -322,7 +329,7 @@ int viafb_dma_copy_out_sg(unsigned int offset, struct scatterlist *sg, int nsg) return 0; } EXPORT_SYMBOL_GPL(viafb_dma_copy_out_sg); - +#endif /* CONFIG_VIDEO_VIA_CAMERA */ /* ---------------------------------------------------------------------- */ /* @@ -507,7 +514,12 @@ static struct viafb_subdev_info { }, { .name = "viafb-i2c", - } + }, +#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE) + { + .name = "viafb-camera", + }, +#endif }; #define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) |