summaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera.h
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (12536): soc-camera: remove .gain and .exposure struct ↵Guennadi Liakhovetski2009-09-191-7/+10
| | | | | | | | | | soc_camera_device members This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle gain and exposure internally in each driver just like all other controls. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12535): soc-camera: remove .init() and .release() methods from ↵Guennadi Liakhovetski2009-09-191-4/+0
| | | | | | | | | | struct soc_camera_ops Remove unneeded soc-camera operations, this also makes the soc-camera API to v4l2 subdevices thinner. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping ↵Guennadi Liakhovetski2009-09-191-2/+19
| | | | | | | | | | | | (S_CROP) The initial soc-camera scaling and cropping implementation turned out to be incompliant with the V4L2 API, e.g., it expected the user to specify cropping in output window pixels, instead of input window pixels. This patch converts the soc-camera core and all drivers to comply with the standard. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()Guennadi Liakhovetski2009-09-191-4/+10
| | | | | | | | Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host drivers and in soc-camera core. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operationGuennadi Liakhovetski2009-09-191-2/+1
| | | | | | | | | | Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev video operations. Also extend non-i2c drivers to also hold a pointer to their v4l2-subdev instance in control device driver-data, i.e., in dev_get_drvdata((struct device *)to_soc_camera_control(icd)) Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12521): soc-camera: use .s_std() from struct v4l2_subdev_core_opsGuennadi Liakhovetski2009-09-191-1/+0
| | | | | | | | Remove .set_std() method from struct soc_camera_ops, use .s_std() from struct v4l2_subdev_core_ops instead. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12519): soc-camera: put pixel format initialisation back in probe, ↵Guennadi Liakhovetski2009-09-191-0/+7
| | | | | | | | | | | | | add .put_formats() The move of format translation initialisation into soc_camera_open() was temporary for the soc-camera as platform driver intermediate step, put it back into soc_camera_probe(). Also add a .put_formats() method to soc_camera_host_ops to free any resources host driver might have allocated in .get_formats(). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_deviceGuennadi Liakhovetski2009-09-191-8/+2
| | | | | | | | Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and simplicity. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12513): soc-camera: add support for camera-host controlsGuennadi Liakhovetski2009-09-191-0/+4
| | | | | | | | Until now soc-camera only supported client (sensor) controls. This patch enables camera-host drivers to implement their own controls too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12510): soc-camera: (partially) convert to v4l2-(sub)dev APIGuennadi Liakhovetski2009-09-191-17/+6
| | | | | | | | | | | | Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using v4l2-subdev operations. Only a part of the interface between the soc_camera core, soc_camera host drivers on one side and soc_camera device drivers on the other side is replaced so far. The rest of the interface will be replaced in incremental steps, and will require extensions and, possibly, modifications to the v4l2-subdev code. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12506): soc-camera: convert to platform deviceGuennadi Liakhovetski2009-09-191-11/+16
| | | | | | | | | | Convert soc-camera core and all drivers to platform device API. We already converted platforms to register a platform device for each soc-camera client, now we remove the compatibility code and switch completely to the new scheme. This is a preparatory step for the v4l2-subdev conversion. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12504): soc-camera: prepare soc_camera_platform.c and its users for ↵Guennadi Liakhovetski2009-09-191-0/+6
| | | | | | | | | | | | | conversion soc_camera_platform.c is only used by y SuperH ap325rxa board. This patch converts soc_camera_platform.c and its users for the soc-camera platform- device conversion and also extends soc-camera core to handle non-I2C cameras. Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11705): soc-camera: prepare for the platform driver conversionGuennadi Liakhovetski2009-06-161-0/+5
| | | | | | | | | Add a platform driver to soc_camera.c. This way we preserve backwards compatibility with existing platforms and can start converting them one by one to the new platform-device soc-camera interface. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11609): soc-camera: remove an extra device generation from struct ↵Guennadi Liakhovetski2009-06-161-2/+2
| | | | | | | | | | soc_camera_host Make camera devices direct children of host platform devices, move the inheritance management into the soc_camera.c core driver. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11607): soc-camera: add a free_bus method to struct soc_camera_linkGuennadi Liakhovetski2009-06-161-0/+1
| | | | | | | | | | | | | | | Currently pcm990 camera bus-width management functions request a GPIO and never free it again. With this approach the GPIO extender driver cannot be unloaded once camera drivers have been loaded, also unloading theb i2c-pxa bus driver produces errors, because the GPIO extender driver cannot unregister properly. Another problem is, that if camera drivers are once loaded before the GPIO extender driver, the platform code marks the GPIO unavailable and only a reboot helps to recover. Adding an explicit free_bus method and using it in mt9m001 and mt9v022 drivers fixes these problems. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11034): soc-camera: remove now unused gpio member of struct ↵Sascha Hauer2009-03-301-2/+0
| | | | | | | | soc_camera_link Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11030): soc-camera: add board hook to specify the buswidth for ↵Sascha Hauer2009-03-301-0/+7
| | | | | | | | | | | | | | | | | camera sensors Camera sensors have a native bus width say support, but on some boards not all sensor data lines are connected to the image interface and thus support a different bus width than the sensors native one. Some boards even have a bus driver which dynamically switches between different bus widths with a GPIO. This patch adds a hook which board code can use to support different bus widths. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11027): soc-camera: configure drivers with a default format at ↵Guennadi Liakhovetski2009-03-301-0/+1
| | | | | | | | | | | | | | | | | probe time Currently soc-camera doesn't set up any image format without an explicit S_FMT. According to the API this should be supported, for example, capture-example.c from v4l2-apps by default doesn't issue an S_FMT. This patch moves negotiating of available host-camera format translations to probe() time, and restores the state from the last close() on the next open(). This is needed for some drivers, which power down or reset hardware after the last user closes the interface. This patch also has a nice side-effect of avoiding multiple allocation anf freeing of format translation tables. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11024): soc-camera: separate S_FMT and S_CROP operationsGuennadi Liakhovetski2009-03-301-2/+4
| | | | | | | | As host and camera drivers become more complex, differences between S_FMT and S_CROP functionality grow, this patch separates them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10675): soc-camera: extend soc_camera_bus_param_compatible with ↵Guennadi Liakhovetski2009-03-301-2/+6
| | | | | | | | | | more tests Add data signal polarity, mode, and bus-width tests to soc_camera_bus_param_compatible(). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10141): v4l2: debugging API changed to match against driver name ↵Hans Verkuil2009-01-021-3/+3
| | | | | | | | | | | | | | | | instead of ID. Since the i2c driver ID will be removed in the near future we have to modify the v4l2 debugging API to use the driver name instead of driver ID. Note that this API is not used in applications other than v4l2-dbg.cpp as it is for debugging and testing only. Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged with a warning that it is deprecated and will be removed in 2.6.30. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10093): soc-camera: add new bus width and signal polarity flagsGuennadi Liakhovetski2008-12-301-9/+14
| | | | | | | | In preparation for i.MX31 camera host driver add flags for 4 and 15 bit bus widths and for data lines polarity inversion. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10087): Add new enum_input function on soc_cameraKuninori Morimoto2008-12-301-0/+1
| | | | | | | | This patch presents new method to be able to select V4L2 input type Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10086): Add new set_std function on soc_cameraKuninori Morimoto2008-12-301-0/+1
| | | | | | | | This patch presents new method to be able to check v4l2_std_id Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10083): soc-camera: unify locking, play nicer with videobuf lockingGuennadi Liakhovetski2008-12-301-3/+5
| | | | | | | | Move mutex from host drivers to camera device object, take into account videobuf locking. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10074): soc-camera: add camera sense dataGuennadi Liakhovetski2008-12-301-0/+27
| | | | | | | | | | | Add a struct soc_camera_sense, that can be used by camera host drivers to request additional information from a camera driver, for example, when changing data format. This struct can be extended in the future, its first use is to request the camera driver whether the pixel-clock frequency has changed. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10072): soc-camera: Add signal inversion flags to be used by camera ↵Guennadi Liakhovetski2008-12-301-0/+11
| | | | | | | | | | | | drivers As reported by Antonio Ospite <ospite@studenti.unina.it> two platforms with a mt9m111 camera require opposite pixel clock polarity, which means one of them inverts it. This patch adds support for inversion flags and switches all available camera drivers to using them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9790): soc-camera: pixel format negotiation - core supportGuennadi Liakhovetski2008-12-301-1/+24
| | | | | | | | | | | | | | | Allocate and fill a list of formats, supported by this specific camera-host combination. Use it for format enumeration. Take care to stay backwards-compatible. Camera hosts rely on sensor formats available, as well as host specific translations. We add a structure so that hosts can define a translation table and use it for format check and setup. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9789): soc-camera: add a per-camera device host private data pointerGuennadi Liakhovetski2008-12-301-0/+1
| | | | | | | | This pointer will be used by pxa_camera.c to point to its pixel format data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9788): soc-camera: simplify namingGuennadi Liakhovetski2008-12-301-6/+4
| | | | | | | | | | We anyway don't follow the s_fmt_vid_cap / g_fmt_vid_cap / try_fmt_vid_cap naming, and soc-camera is so far only about video capture, let's simplify operation names a bit further. set_fmt_cap / try_fmt_cap wasn't a very good choice too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9787): soc-camera: let camera host drivers decide upon pixel formatGuennadi Liakhovetski2008-12-301-0/+3
| | | | | | | | | | | | | Pixel format requested by the user is not necessarily the same, as what a sensor driver provides. There are situations, when a camera host driver provides the required format, but requires a different format from the sensor. Further, the list of formats, supported by sensors is pretty static and can be pretty good described with a constant list of structures. Whereas decisions, made by camera host drivers to support requested formats can be quite complex, therefore it is better to let the host driver do the work. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9785): soc-camera: merge .try_bus_param() into .try_fmt_cap()Guennadi Liakhovetski2008-12-301-1/+0
| | | | | | | | | .try_bus_param() method from struct soc_camera_host_ops is only called at one location immediately before .try_fmt_cap(), there is no value in keeping these two methods separate, merge them. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), ↵Kay Sievers2008-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_set_name() This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Thanks, Kay Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8687): soc-camera: Move .power and .reset from soc_camera host to ↵Stefan Herbrechtsmeier2008-10-121-0/+3
| | | | | | | | | | | | | sensor driver Make .power and .reset callbacks per camera instead of per host, also move their invocation to camera drivers. .arch/arm/mach-pxa/include/mach/camera.h | 2 - Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8610): Add suspend/resume capabilities to soc_camera.Robert Jarzmik2008-08-061-0/+5
| | | | | | | | | | | | | 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8339): soc_camera: Add 16-bit bus width supportMagnus Damm2008-07-201-3/+4
| | | | | | | | | The SuperH Mobile CEU hardware supports 16-bit width bus, so extend the soc_camera code with SOCAM_DATAWIDTH_16. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8338): soc_camera: Move spinlocksMagnus Damm2008-07-201-4/+1
| | | | | | | | | | | | | 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8337): soc_camera: make videobuf independentPaulius Zaleckas2008-07-201-3/+3
| | | | | | | | | | 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> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7501): soc-camera: use a spinlock for videobuffer queueGuennadi Liakhovetski2008-04-241-0/+3
| | | | | | | | 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>
* V4L/DVB (7500): soc-camera: extract function pointers from host object into ↵Guennadi Liakhovetski2008-04-241-3/+6
| | | | | | | | | | operations 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>
* V4L/DVB (7406): soc-camera: improve separation between soc_camera_ops and ↵Guennadi Liakhovetski2008-04-241-4/+4
| | | | | | | | soc_camera_device In case of muliple cameras, handled by the same driver, they can support Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7336): soc-camera: streamline hardware parameter negotiationGuennadi Liakhovetski2008-04-241-14/+38
| | | | | | | | | | 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>
* V4L/DVB (7276): soc-camera: deactivate cameras when not usedGuennadi Liakhovetski2008-04-241-0/+2
| | | | | | | | | | | | 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>
* V4L/DVB (7170): soc_camera V4L2 driver for directly-connected SoC-based camerasGuennadi Liakhovetski2008-04-241-0/+147
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>
OpenPOWER on IntegriCloud