summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/soc_camera
Commit message (Collapse)AuthorAgeFilesLines
* [media] soc_camera: don't break long linesMauro Carvalho Chehab2016-10-213-6/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code. As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines. So, join those continuation lines. The patch was generated via the script below, and manually adjusted if needed. </script> use Text::Tabs; while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; } </script> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: move mt9m111 out of soc_cameraRobert Jarzmik2016-09-093-1039/+5Star
| | | | | | | | | | As the mt9m111 is now working as a standalone v4l2 subdevice sensor, move it out of soc_camera directory and sever its dependency on soc_camera. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: use only the SRGB colorspaceRobert Jarzmik2016-09-091-4/+4
| | | | | | | | | mt9m111 being a camera sensor, its colorspace should always be SRGB, for both RGB based formats or YCbCr based ones. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: make a standalone v4l2 subdeviceRobert Jarzmik2016-09-091-36/+15Star
| | | | | | | | | | | | | | | | | Remove the soc_camera adherence. Mostly the change removes the power manipulation provided by soc_camera, and instead : - powers on the sensor when the s_power control is activated - powers on the sensor in initial probe - enables and disables the MCLK provided to it in power on/off This patch also drops support for inverters on synchronisation and clock lines. It is assumed, if any board ever needs such inverters, support for them can be added in the future Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] v4l2: remove g/s_crop from video opsHans Verkuil2016-08-2414-373/+371Star
| | | | | | | | | | | | | | Replace all calls to g/s_crop by calls to the get/set_selection pad ops. Remove the old g/s_crop video ops since they are now no longer used. The cropcap video op is now only used to pass pixelaspect information, and is only needed if the pixelaspect is not 1:1. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] soc_camera: constify v4l2_subdev_sensor_ops structuresJulia Lawall2016-01-253-3/+3
| | | | | | | | | | | The v4l2_subdev_sensor_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] include/media: move driver interface headers to a separate dirMauro Carvalho Chehab2015-11-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's not mix headers used by the core with those headers that are needed by some driver-specific interface header. The headers used on drivers were manually moved using: mkdir include/media/drv-intf/ git mv include/media/cx2341x.h include/media/cx25840.h \ include/media/exynos-fimc.h include/media/msp3400.h \ include/media/s3c_camif.h include/media/saa7146.h \ include/media/saa7146_vv.h include/media/sh_mobile_ceu.h \ include/media/sh_mobile_csi2.h include/media/sh_vou.h \ include/media/si476x.h include/media/soc_mediabus.h \ include/media/tea575x.h include/media/drv-intf/ And the references for those headers were corrected using: MAIN_DIR="media/" PREV_DIR="media/" DIRS="drv-intf/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
* [media] include/media: split I2C headers from V4L2 coreMauro Carvalho Chehab2015-11-175-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes harder to identify what core headers should be documented and what headers belong to I2C drivers that are included only by bridge/main drivers that would require the functions provided by them. Let's move those i2c specific files to its own subdirectory. The files to move were produced via the following script: mkdir include/media/i2c (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done And the references corrected via this script: MAIN_DIR="media/" PREV_DIR="media/" DIRS="i2c/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
* [media] mt9t112: JPEG -> SRGBHans Verkuil2015-08-111-4/+4
| | | | | | | | | The JPEG colorspace should only be used for JPEG encoded images. This is just a regular sRGB sensor. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] tw9910: init priv->scale and update standardHans Verkuil2015-08-111-1/+28
| | | | | | | | When the standard changes the VACTIVE and VDELAY values need to be updated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] tw9910: don't use COLORSPACE_JPEGHans Verkuil2015-08-111-3/+3
| | | | | | | | This is an SDTV video receiver, so the colorspace should be SMPTE170M. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2: replace try_mbus_fmt by set_fmtHans Verkuil2015-05-0114-168/+189
| | | | | | | | | | | | | | | The try_mbus_fmt video op is a duplicate of the pad op. Replace all uses in sub-devices by the set_fmt() pad op. Since try_mbus_fmt and s_mbus_fmt both map to the set_fmt pad op (but with a different 'which' argument), this patch will replace both try_mbus_fmt and s_mbus_fmt by set_fmt. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2: replace video op g_mbus_fmt by pad op get_fmtHans Verkuil2015-05-0112-36/+96
| | | | | | | | | | | The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2: replace enum_mbus_fmt by enum_mbus_codeHans Verkuil2015-05-0114-72/+143
| | | | | | | | | | | | | Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kamil Debski <k.debski@samsung.com> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ov2640: add missing consumer.h includeHans Verkuil2015-04-081-0/+1
| | | | | | | Needed for mips and sh platforms Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: ov2640: add primary dt supportJosh Wu2015-04-021-7/+83
| | | | | | | | | | | | Add device tree support for ov2640. In device tree, user needs to provide the master clock (xvclk). User can add the reset/pwdn pins if they have. Cc: devicetree@vger.kernel.org Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: ov2640: add async probe functionJosh Wu2015-04-021-14/+22
| | | | | | | | | | | | In async probe, there is a case that ov2640 is probed before the host device which provided 'mclk'. To support this async probe, we will get 'mclk' at first in the probe(), if failed it will return -EPROBE_DEFER. That will let ov2640 wait for the host device probed. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: drop call to v4l2_device_unregister_subdev()Lad, Prabhakar2015-03-031-1/+0Star
| | | | | | | | | | These drivers are moved to support asynchronous probing, v4l2_async_unregister_subdev() unregisters the subdev so there isn't a need to explicitly call v4l2_device_unregister_subdev(). Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ov2640: use the v4l2 size definitionsJosh Wu2015-02-021-52/+30Star
| | | | | | | | | Reuse the v4l2 size definitions from v4l2-image-sizes.h. So we can remove the rudundent definitions from ov2640.c. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] i2c: Make use of media_bus_format enumBoris BREZILLON2014-11-1414-203/+203
| | | | | | | | | | | | | | | In order to have subsytem agnostic media bus format definitions we've moved media bus definitions to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Replace all references to the old definitions in i2c drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ov9740: use true/false for boolean varsMauro Carvalho Chehab2014-09-031-2/+2
| | | | | | | Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] soc_camera: ov772x: Include media/v4l2-image-sizes.hAxel Lin2014-08-211-4/+1Star
| | | | | | | So we can remove the same defines in the driver code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] soc_camera: mt9t112: Include media/v4l2-image-sizes.hAxel Lin2014-08-211-3/+1Star
| | | | | | | So we can remove the same defines in the driver code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: mt9m111: add device-tree suppportRobert Jarzmik2014-07-311-0/+12
| | | | | | | | Add device-tree support for mt9m111 camera sensor. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] Fix 64-bit division fall-out from 64-bit control rangesHans Verkuil2014-07-173-8/+8
| | | | | | | | | | | | | | Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value control values in a division or modulus operations since not all architectures support those natively. Luckily, in almost all cases it is possible to just cast to 32 bits (the control value is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to use do_div in one function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart2014-05-241-2/+2
| | | | | | | | | | | | The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] tw9910: add g_tvnorms video opHans Verkuil2014-05-141-0/+7
| | | | | | | | | | Report to soc_camera which standards are supported by tw9910. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] videodev2: Set vb2_rect's width and height as unsignedRicardo Ribalda2014-01-071-2/+2
| | | | | | | | | | | | | | As discussed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields from __s32 to __u32. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> (documentation and smiapp) Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media_tree: Fix spelling errorsJonathan McCrohan2013-11-291-1/+1
| | | | | | | | | | | | Fix various spelling errors in strings and comments throughout the media tree. The majority of these were found using Lucas De Marchi's codespell tool. [m.chehab@samsung.com: discard hunks with conflicts] Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] imx074: fix error handling for failed async subdevice registrationGuennadi Liakhovetski2013-10-311-1/+3
| | | | | | | If v4l2_async_register_subdev() fails, don't skip the clean up. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: Remove unnecessary semicolonsJoe Perches2013-10-171-1/+1
| | | | | | | | | These aren't necessary after switch and while statements. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: mt9m111: switch to asynchronous subdevice probingGuennadi Liakhovetski2013-08-181-12/+26
| | | | | | | | Convert the mt9m111 driver to asynchronous subdevice probing. Synchronous probing is also still possible. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: mt9t031: don't Oops if asynchronous probing is attemptedGuennadi Liakhovetski2013-08-181-2/+5
| | | | | | | | | | The mt9t031 driver hasn't yet been updated to support asynchronous subdevice probing. If such a probing is attempted, the driver is allowed to fail, but it shouldn't Oops. This patch fixes such a potential NULL pointer dereference. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] imx074: support asynchronous probingGuennadi Liakhovetski2013-06-211-3/+17
| | | | | | | | | | Both synchronous and asynchronous imx074 subdevice probing is supported by this patch. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: switch I2C subdevice drivers to use v4l2-clkGuennadi Liakhovetski2013-06-2115-36/+228
| | | | | | | | | | | Instead of centrally enabling and disabling subdevice master clocks in soc-camera core, let subdevice drivers do that themselves, using the V4L2 clock API and soc-camera convenience wrappers. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera: tw9910: Remove empty functionSachin Kamat2013-06-211-6/+0Star
| | | | | | | | | | After the switch to devm_* functions, the 'remove' function does not do anything. Delete it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera: mt9t112: Remove empty functionSachin Kamat2013-06-211-6/+0Star
| | | | | | | | | | After the switch to devm_* functions, the 'remove' function does not do anything. Delete it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera: Fix checkpatch warning in ov9640.cSachin Kamat2013-06-211-1/+1
| | | | | | | | | Silences the following warning: WARNING: please, no space before tabs Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera: Constify dev_pm_ops in mt9t031.cSachin Kamat2013-06-211-1/+1
| | | | | | | | | Silences the following warning: WARNING: struct dev_pm_ops should normally be const Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media/i2c: fill in missing reg->size fieldsHans Verkuil2013-06-172-0/+2
| | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera sensors: remove g_chip_ident opHans Verkuil2013-06-1714-300/+21Star
| | | | | | | This is no longer needed since the core now handles this through DBG_G_CHIP_INFO. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_register ioctlHans Verkuil2013-03-2413-13/+13
| | | | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc_camera: remove two outdated selectsPaul Bolle2013-03-211-2/+0Star
| | | | | | | | | | | | | | | | | Release v2.6.30 removed the MT9M001_PCA9536_SWITCH and MT9V022_PCA9536_SWITCH Kconfig symbols, in commits 36034dc325ecab63c8cfb992fbf9a1a8e94738a2 ("V4L/DVB (11032): mt9m001: allow setting of bus width from board code") and e958e27adeade7fa085dd396a8a0dfaef7e338c1 ("V4L/DVB (11033): mt9v022: allow setting of bus width from board code"). These two commits removed all gpio related code from these two drivers. But they skipped removing their two selects of GPIO_PCA953X. Remove these now as they are outdated. Their dependencies can never evaluate to true anyhow. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9v022 driver: send valid HORIZONTAL_BLANKING values to mt9v024 soc ↵Andrei Andreyanau2013-03-211-5/+14
| | | | | | | | | | | | | | | camera This patch fixes the issue that appears when mt9v024 camera is used with the mt9v022 soc camera driver. The minimum total row time is 690 columns (horizontal width + horizontal blanking). The minimum horizontal blanking is 61. Thus, when the window width is set below 627, horizontal blanking must be increased. For the mt9v024 camera the values above are correct and for the mt9v022 camera the correct values are in the existing kernel driver. Signed-off-by: Andrei Andreyanau <a.andreyanau@sam-solutions.net> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9m111: fix Oops - initialise context before dereferencingGuennadi Liakhovetski2013-03-211-2/+3
| | | | | | | | | | | | A recent commit "[media] soc-camera: Push probe-time power management to drivers" causes an Oops during mt9m111 driver probing because its .ctx private data field is now dereferenced before it is initialised. Fix this by initialising the field earlier. Reported-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: mt9m111: Fix auto-exposure controlBenoît Thébaudeau2013-03-211-2/+2
| | | | | | | | | | | | | | | | Commit f9bd5843658e18a7097fc7258c60fb840109eaa8 changed V4L2_CID_EXPOSURE_AUTO from boolean to enum, and commit af8425c54beb3c32cbb503a379132b3975535289 changed the creation of this control into a menu for the mt9m111. However, mt9m111_set_autoexposure() is still interpreting the value set for this control as a boolean, which also conflicts with the default value of this control set to V4L2_EXPOSURE_AUTO (0). This patch makes mt9m111_set_autoexposure() interpret the value set for V4L2_CID_EXPOSURE_AUTO as defined by enum v4l2_exposure_auto_type. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Tested-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9t112: mt9t111 format set up differs from mt9t112Guennadi Liakhovetski2013-02-131-5/+13
| | | | | | | | | | | | | The original commit, adding the mt9t112 driver said, that mt9t111 and mt9t112 had identical register layouts. This however doesn't seem to be the case. At least pixel format selection in the mt9t111 datasheet is different from the driver implementation. So far only the default YUYV format has been verified to work with mt9t111. Limit the driver to only report one supported format with mt9t111 until more formats are implemented. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: use devm_kzalloc in subdevice driversGuennadi Liakhovetski2013-01-0514-148/+50Star
| | | | | | | | I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so simplifies their clean up paths. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: split struct soc_camera_link into host and subdevice partsGuennadi Liakhovetski2013-01-0514-137/+138
| | | | | | | | | struct soc_camera_link currently contains fields, used both by sensor and bridge drivers. To make subdevice driver re-use simpler, split it into a host and a subdevice parts. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9v022: fix potential NULL pointer dereference in mt9v022_probe()Wei Yongjun2013-01-051-1/+2
| | | | | | | | | The dereference to 'icl' should be moved below the NULL test. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>