summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/soc_camera.c
AgeCommit message (Collapse)Author
2008-08-02Add suspend/resume capabilities to soc_camera.Robert Jarzmik
Add suspend/resume hooks to call soc operation specific suspend and resume functions. This ensures the camera chip has been previously resumed, as well as the camera bus. These hooks in camera chip drivers should save/restore chip context between suspend and resume time. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/soc_camera.c | 26 ++++++++++++++++++++++++++ include/media/soc_camera.h | 5 +++++ 2 files changed, 31 insertions(+), 0 deletions(-)
2008-07-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-21videodev: move all ioctl callbacks to a new v4l2_ioctl_ops structHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: rename 'dev' to 'parent'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The field 'dev' is not the video device, but the parent of the video device. Rename accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-11soc_camera: Move spinlocksMagnus Damm
This patch moves the spinlock handling from soc_camera.c to the actual camera host driver. The spinlock_alloc/free callbacks are replaced with code in init_videobuf(). So far all camera host drivers implement their own spinlock_alloc/free methods anyway, and videobuf_queue_core_init() BUGs on a NULL spinlock argument, so, new camera host drivers will not forget to provide a spinlock when initialising their videobuf queues. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> --- drivers/media/video/pxa_camera.c | 17 ++++------------ drivers/media/video/soc_camera.c | 39 -------------------------------------- include/media/soc_camera.h | 5 ---- 3 files changed, 7 insertions(+), 54 deletions(-)
2008-07-11soc_camera: make videobuf independentPaulius Zaleckas
Makes SoC camera videobuf independent. Includes all necessary changes for PXA camera driver (currently the only driver using soc_camera in the mainline). These changes are important for the future soc_camera based drivers. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Cc: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
2008-06-13soc-camera: remove soc_camera_host_class classGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Devices can either be class devices or bus devices, not both at the same time. Soc-camera host devices usually have a platform device as their parent. Trying to also register them with a class crashes the kernel, when linked statically. Interestingly, it works when built as a module. Thanks to Paulius Zaleckas for reporting. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
2008-06-01soc_camera: missed fmt callback conversion.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-04-22soc-camera: Remove redundant returnGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> This obviously redundant return has been in the driver from the very first version. Remove it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-04-15soc-camera: re-sync with -git treeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> The proper fix were applied at -git. Re-apply the missing parts with the new base. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-15> Please, re-generate the affected V4L/DVB patches, without the PXA part. I'llMauro Carvalho Chehab
> keep those changes on hold, until I get a confirmation that the PXA side is > committed on mainstream. Reverted several changes on soc_camera From: Mauro Carvalho Chehab <mchehab@infradead.org> As asked by Guennadi: Mauro, please, drop commits 2f4a87873f13924871d7bb82e27d02d0e16fbe02 and 9b7d577c508e7765860e599c0e98d4ac3fbaa2aa from your tree and replace 5f1e5244ee6b9f139a262d5e7a930a41488afbbe with the version below. Due to that change, that happened on v4l-dvb -git tree, several patches broke. This patch reverts all broken stuff, keeping this tree in sync with v4l-dvb -git tree. I'm waiting for Guennadi to fix the broken patches and ask me to pull them again. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-15 soc-camera: Remove redundant returnMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> This obviously redundant return has been in the driver from the very first version. Remove it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-08media/video/ replace remaining __FUNCTION__ occurrencesMichael Krufky
From: Harvey Harrison <harvey.harrison@gmail.com> __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-04-04 soc-camera: use a spinlock for videobuffer queueMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> All drivers should provide a spinlock to be used in videobuf operations. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Reviewed-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-04 soc-camera: extract function pointers from host object into operationsMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Function pointers and the driver owner are not expected to change throughout soc-camera host's life. Extract them into an operations struct. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-24 soc-camera: improve separation between soc_camera_ops and soc_camera_deviceMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> In case of muliple cameras, handled by the same driver, they can support different picture formats, therefore formats and num_formats cannot belong to soc_camera_ops, which is only one per driver, move them to soc_camera_device, which is one per device instance. OTOH, probe and remove methods are always the same, move them to soc_camera_ops. Thanks to Eric Miao for making me look at this code again:-) Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-12 drivers/media/video/soc_camera.c: reads return size_tMauro Carvalho Chehab
From: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> CC: Guennadi Liakhovetski <kernel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-07 soc-camera: streamline hardware parameter negotiationMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Improve hardware parameter negotiation between the camera host driver and camera drivers. Parameters like horizontal and vertical synchronisation, pixel clock polarity shall be set depending on capabilities of the parties. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-25 soc-camera: deactivate cameras when not usedMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Only attach cameras to the host interface for probing, then detach until open. This allows platforms with several cameras on an interface, physically supporting only one camera, to handle multiple cameras and activate them selectively after initial probing. The first attach during probe is needed to activate the host interface to be able to physically communicate with cameras. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-25From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>Mauro Carvalho Chehab
Subject: Convert videobuf-dma-sg to generic DMA API Date: Tue, 19 Feb 2008 13:40:54 +0100 (CET) videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-05 soc_camera V4L2 driver for directly-connected SoC-based camerasMauro Carvalho Chehab
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> This driver provides an interface between platform-specific camera busses and camera devices. It should be used if the camera is connected not over a "proper" bus like PCI or USB, but over a special bus, like, for example, the Quick Capture interface on PXA270 SoCs. Later it should also be used for i.MX31 SoCs from Freescale. It can handle multiple cameras and / or multiple busses, which can be used, e.g., in stereo-vision applications. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>