summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9m111.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] mt9m111: changed MIN_DARK_COLS to MT9M131 spec countMichael Grzeschik2010-10-211-1/+1
| | | | | | | | Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Acked-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: mt9m111: register cleanup hex to dec bitoffsetMichael Grzeschik2010-10-211-8/+8
| | | | | | | Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l: Use v4l2_get_subdevdata instead of accessing v4l2_subdev::privLaurent Pinchart2010-10-211-10/+10
| | | | | | | | | Replace direct access to the v4l2_subdev priv field with the inline v4l2_get_subdevdata method. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mt9m111: added current colorspace at g_fmtMichael Grzeschik2010-09-271-0/+1
| | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mt9m111: cropcap and s_crop check if type is VIDEO_CAPTUREMichael Grzeschik2010-09-271-1/+6
| | | | | | | Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mt9m111: init chip after read CHIP_VERSIONMichael Grzeschik2010-08-081-4/+2
| | | | | | | | | | | Moved mt9m111_init after the chip version detection passage: I don't like the idea of writing on a device we haven't identified yet. Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mt9m111: Added indication that MT9M131 is supported by this driverPhilipp Wiesner2010-08-081-14/+22
| | | | | | | | | | | | Added this info to Kconfig and mt9m111.c, some comment cleanup, replaced 'mt9m11x'-statements by clarifications or driver name. Driver is fully compatible to mt9m131 which has only additional functions compared to mt9m111. Those aren't used anyway at the moment. Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mediabus: fix ambiguous pixel code namesGuennadi Liakhovetski2010-08-021-8/+8
| | | | | | | | | Endianness notation is meaningless for 8 bit YUYV codes. Switch pixel code names to explicitly state the order of colour components in the data stream. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'v4l_for_2.6.35' of ↵Linus Torvalds2010-06-041-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (87 commits) V4L/DVB: ivtv: Timing tweaks and code re-order to try and improve stability V4L/DVB: ivtv: Avoid accidental video standard change V4L/DVB: ivtvfb : Module load / unload fixes V4L/DVB: cx2341x: Report correct temporal setting for log-status V4L/DVB: cx18, cx23885, v4l2 doc, MAINTAINERS: Update Andy Walls' email address V4L/DVB: drivers/media: Eliminate a NULL pointer dereference V4L/DVB: dvb-core: Fix ULE decapsulation bug V4L/DVB: Bug fix: make IR work again for dm1105 V4L/DVB: media/IR: nec-decoder needs to select BITREV V4L/DVB: video/saa7134: change dprintk() to i2cdprintk() V4L/DVB: video/saa7134: remove duplicate break V4L/DVB: IR/imon: add auto-config for 0xffdc rf device V4L/DVB: IR/imon: clean up usage of bools V4L/DVB: em28xx: remove unneeded null checks V4L/DVB: ngene: remove unused #include <linux/version.h> V4L/DVB: ak881x needs slab.h V4L/DVB: FusionHDTV: Use quick reads for I2C IR device probing V4L/DVB: Technotrend S2-3200 ships with a TT 1500 remote V4L/DVB: drivers/media: Use kzalloc V4L/DVB: m920x: Select simple tuner ...
| * V4L/DVB: v4l2-subdev.h: fix enum_mbus_fmt prototypeHans Verkuil2010-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | enum_mbus_fmt received an index argument that was defined as an int instead of an unsigned int. This is now fixed. This had the knock-on effect that the index argument in the callback get_formats in soc_camera.h also had to be changed to unsigned int. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | i2c: Remove all i2c_set_clientdata(client, NULL) in driversWolfram Sang2010-06-031-2/+0
|/ | | | | | | | | | | | | | | | | | | | | I2C drivers can use the clientdata-pointer to point to private data. As I2C devices are not really unregistered, but merely detached from their driver, it used to be the drivers obligation to clear this pointer during remove() or a failed probe(). As a couple of drivers forgot to do this, it was agreed that it was cleaner if the i2c-core does this clearance when appropriate, as there is no guarantee for the lifetime of the clientdata-pointer after remove() anyhow. This feature was added to the core with commit e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers. As there is no need anymore to clear the clientdata-pointer, remove all current occurrences in the drivers to simplify the code and prevent confusion. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* V4L/DVB (13659): soc-camera: convert to the new mediabus APIGuennadi Liakhovetski2009-12-161-74/+114
| | | | | | | | | | Convert soc-camera core and all soc-camera drivers to the new mediabus API. This also takes soc-camera client drivers one step closer to also be usable with generic v4l2-subdev host drivers. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use ↵Guennadi Liakhovetski2009-12-161-1/+0
| | | | | | | | | | | | | | g_skip_top_lines in soc-camera Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and .enum_frameintervals() methods to it, add a new .g_skip_top_lines() method and switch soc-camera to use it instead of .y_skip_top soc_camera_device member, which can now be removed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12536): soc-camera: remove .gain and .exposure struct ↵Guennadi Liakhovetski2009-09-191-8/+21
| | | | | | | | | | 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-32/+8
| | | | | | | | | | 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-17/+95
| | | | | | | | | | | | (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 (12531): soc-camera: Use I2C device for dev_{dbg,info,...} output in ↵Guennadi Liakhovetski2009-09-191-6/+5
| | | | | | | all clients 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-4/+5
| | | | | | | | | | 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 (12515): soc-camera: use struct v4l2_rect in struct soc_camera_deviceGuennadi Liakhovetski2009-09-191-10/+10
| | | | | | | | 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 (12510): soc-camera: (partially) convert to v4l2-(sub)dev APIGuennadi Liakhovetski2009-09-191-180/+129
| | | | | | | | | | | | 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-76/+78
| | | | | | | | | | 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 (11610): soc-camera: simplify register access routines in multiple ↵Guennadi Liakhovetski2009-06-161-33/+40
| | | | | | | | | | sensor drivers Register access routines only need the I2C client, not the soc-camera device context. 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-17/+39
| | | | | | | | 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 (10676): mt9m111: Call icl->reset() on mt9m111_reset().Antonio Ospite2009-03-301-0/+6
| | | | | | | | | Call icl->reset() on mt9m111_reset(). Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Acked-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 (10665): soc-camera: add data signal polarity flags to driversGuennadi Liakhovetski2009-03-301-1/+1
| | | | | | | | | All soc-camera camera and host drivers must specify supported data signal polarity, after all drivers are fixed, we'll add a suitable test 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-9/+10
| | | | | | | | | | | | | | | | 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 (10080): soc-camera: readability improvements, more strict ↵Guennadi Liakhovetski2008-12-301-4/+6
| | | | | | | | | | | operations checks Simplify multiple drivers by replacing f->fmt.pix.* with a single pointer dereference, merge some needlessly broken lines, verify host and camera operations pointers on registration. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10077): mt9m111: add support for mt9m112 since sensors seem identicalMike Rapoport2008-12-301-12/+16
| | | | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10073): mt9m111: Add automatic white balance controlRobert Jarzmik2008-12-301-1/+27
| | | | | | 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@redhat.com>
* V4L/DVB (10072): soc-camera: Add signal inversion flags to be used by camera ↵Guennadi Liakhovetski2008-12-301-1/+5
| | | | | | | | | | | | 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 (10065): mt9m111: add all yuv format combinations.Robert Jarzmik2008-12-301-1/+23
| | | | | | | | | | The Micron mt9m111 offers 4 byte orders for YCbCr output. This patchs adds all possible outputs capabilities to the mt9m111 driver. 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@redhat.com>
* V4L/DVB (10064): mt9m111: mt9m111_get_global_gain() - unsigned >= 0 is ↵roel kluin2008-12-301-8/+5
| | | | | | | | | | | always true unsigned >= 0 is always true and fix formula Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-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 (9788): soc-camera: simplify namingGuennadi Liakhovetski2008-12-301-6/+6
| | | | | | | | | | 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 (8800): [v4l-dvb-maintainer] [PATCH] v4l: mt9m111.c make function staticHarvey Harrison2008-10-121-1/+1
| | | | | | | | | | drivers/media/video/mt9m111.c:758:5: warning: symbol 'mt9m111_restore_state' was not declared. Should it be static? New warning in next-20080825 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.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/+15
| | | | | | | | | | | | | 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 (8686): mt9m111: style cleanupGuennadi Liakhovetski2008-10-121-44/+42
| | | | | | | | Fix a typo in Kconfig, simplify error checking, further minor cleanup. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.iakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8684): Add support for Micron MT9M111 camera.Robert Jarzmik2008-10-121-0/+960
Adds support for Micron MT9M111 camera chip, with basic features : - view rectangle configurable - some output formats (bayer8, bayer10, rgb565, rgb555, ycbycr) - autoexposure - only highpower mode context used (ie. context B) create mode 100644 drivers/media/video/mt9m111.c 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@redhat.com>
OpenPOWER on IntegriCloud