summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/soc_camera
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* Merge remote-tracking branch 'linus/master' into staging/for_v3.8Mauro Carvalho Chehab2012-11-281-3/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * linus/master: (1428 commits) futex: avoid wake_futex() for a PI futex_q watchdog: using u64 in get_sample_period() writeback: put unused inodes to LRU after writeback completion mm: vmscan: check for fatal signals iff the process was throttled Revert "mm: remove __GFP_NO_KSWAPD" proc: check vma->vm_file before dereferencing UAPI: strip the _UAPI prefix from header guards during header installation include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID Linux 3.7-rc7 powerpc/eeh: Do not invalidate PE properly ALSA: hda - Fix build without CONFIG_PM of/address: sparc: Declare of_iomap as an extern function for sparc again PM / QoS: fix wrong error-checking condition bnx2x: remove redundant warning log vxlan: fix command usage in its doc 8139cp: revert "set ring address before enabling receiver" MPI: Fix compilation on MIPS with GCC 4.4 and newer MIPS: Fix crash that occurs when function tracing is enabled MIPS: Merge overlapping bootmem ranges jbd: Fix lock ordering bug in journal_unmap_buffer() ...
| * [media] mt9v022: fix the V4L2_CID_EXPOSURE controlAnatolij Gustschin2012-11-221-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the MT9V022_TOTAL_SHUTTER_WIDTH register is controlled in manual mode by V4L2_CID_EXPOSURE control, it shouldn't be written directly in mt9v022_s_crop(). In manual mode this register should be set to the V4L2_CID_EXPOSURE control value. Changing this register directly and outside of the actual control function means that the register value is not in sync with the corresponding control value. Thus, the following problem is observed: - setting this control initially succeeds - VIDIOC_S_CROP ioctl() overwrites the MT9V022_TOTAL_SHUTTER_WIDTH register - setting this control to the same value again doesn't result in setting the register since the control value was previously cached and doesn't differ Remove MT9V022_TOTAL_SHUTTER_WIDTH register setting in mt9v022_s_crop() and add a comment explaining why it is not needed in manual mode. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] mt9v022: set y_skip_top field to zero as defaultAnatolij Gustschin2012-11-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Set "y_skip_top" to zero and revise comment as I do not see this line corruption on two different mt9v022 setups. The first read-out line is perfectly fine. Add mt9v022 platform data configuring y_skip_top for platforms that have issues with the first read-out line. Set y_skip_top to 1 for pcm990 board. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] mt9v022: support required register settings in snapshot modeAnatolij Gustschin2012-11-221-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some camera systems cannot operate mt9v022 in normal mode and use only the snapshot mode. The TechNote for mt9v022 (TN0960) and mt9v024 (TN-09-225) describes required register settings when configuring the snapshot operation. The snapshot mode requires that certain automatic functions of the image sensor should be disabled or set to fixed values. According to the TechNote bit 2 and bit 9 in the register 0x20 must be set in snapshot mode and unset for normal operation. This applies for mt9v022 Rev.3 and mt9v024. Add required reg. 0x20 settings dependent on sensor chip version. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] mt9v022: add v4l2 controls for blankingAnatolij Gustschin2012-11-221-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | Add controls for horizontal and vertical blanking. Also add an error message for case that the control handler init failed. Since setting the blanking registers is done by controls now, we shouldn't change these registers outside of the control function. Use v4l2_ctrl_s_ctrl() to set them. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] ov2640: add support for V4L2_MBUS_FMT_YUYV8_2X8, ↵Frank Schäfer2012-11-221-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | V4L2_MBUS_FMT_RGB565_2X8_BE This is the result of experimenting with the SpeedLink VAD Laplace webcam. The register sequence for V4L2_MBUS_FMT_YUYV8_2X8 has been identified by analyzing USB-logs of this device running on MS Windows. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] soc_camera/ov2640: Don't use a temp var for an unused valueMauro Carvalho Chehab2012-10-281-4/+2Star
|/ | | | | | | drivers/media/i2c/soc_camera/ov2640.c:899:32: warning: variable 'win' set but not used [-Wunused-but-set-variable] Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov2640: select sensor register bank before applying h/v-flip settingsFrank Schäfer2012-10-061-0/+5
| | | | | | | | | | We currently don't select the register bank in ov2640_s_ctrl, so we can end up writing to DSP register 0x04 instead of sensor register 0x04. This happens for example when calling ov2640_s_ctrl after ov2640_s_fmt. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_crop constHans Verkuil2012-09-268-34/+34
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_crop. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* sh_mobile_csi2: move it to the right placeMauro Carvalho Chehab2012-08-211-398/+0Star
| | | | | | | | make[4]: *** No rule to make target `drivers/media/platform/sh_mobile_csi2.c', needed by `drivers/media/platform/sh_mobile_csi2.o'. Stop. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9v022: Add support for mt9v024Alex Gershgorin2012-08-162-6/+32
| | | | | | | | | | Driver for mt9v022 camera sensor is fully compatible for mt9v024 camera sensor with the exception of several registers which have been changed addresses. mt9v024 also has improved and additional features, but they are currently not in use. Signed-off-by: Alex Gershgorin <alexg@meprolight.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Stop sensor readout right after resetLaurent Pinchart2012-08-151-2/+8
| | | | | | | | | The sensor starts streaming video as soon as it gets powered or is reset. Disable the output in the reset function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Compute window size registers at runtimeLaurent Pinchart2012-08-151-95/+67Star
| | | | | | | | | Instead of hardcoding register arrays, compute the values at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: keep (Q)VGA_* macros for now] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Add support for SBGGR10 formatLaurent Pinchart2012-08-151-7/+36
| | | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Add ov772x_read() and ov772x_write() functionsLaurent Pinchart2012-08-151-16/+22
| | | | | | | | And use them instead of calling SMBus access functions directly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Make to_ov772x convert from v4l2_subdev to ov772x_privLaurent Pinchart2012-08-151-11/+10Star
| | | | | | | | | | | Conversion from i2c_client to ov772x_priv is only needed in a single location, while conversion from v4l2_subdev to ov772x_priv is needed in several locations. Perform the former manually, and use to_ov772x for the later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: try_fmt must not default to the current formatLaurent Pinchart2012-08-151-29/+7Star
| | | | | | | | | If the requested format isn't supported, return a fixed default format instead of the current format. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Don't fail in s_fmt if the requested format isn't supportedLaurent Pinchart2012-08-151-40/+43
| | | | | | | | Select a default format instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Select the default format at probe timeLaurent Pinchart2012-08-151-32/+32
| | | | | | | | | | | | The format and window size are only initialized during the first g_fmt call. This leaves the device in an inconsistent state after initialization, which will cause problems when implementing pad operations. Move the format and window size initialization to probe time. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov772x: Fix memory leak in probe error pathLaurent Pinchart2012-08-151-5/+4Star
| | | | | | | | The control handler isn't freed if its initialization fails. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: Push probe-time power management to driversLaurent Pinchart2012-08-1514-103/+204
| | | | | | | | | | | | | | | | | Several client drivers access the hardware at probe time, for instance to read the probe chip ID. Such chips need to be powered up when being probed. soc-camera handles this by powering chips up in the soc-camera probe implementation. However, this will break with non soc-camera hosts that don't perform the same operations. Fix the problem by pushing the power up/down from the soc-camera core down to individual drivers on a needs basis. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] soc-camera: Add and use soc_camera_power_[on|off]() helper functionsLaurent Pinchart2012-08-1514-28/+160
| | | | | | | | | | | | | Instead of forcing all soc-camera drivers to go through the mid-layer to handle power management, create soc_camera_power_[on|off]() functions that can be called from the subdev .s_power() operation to manage regulators and platform-specific power handling. This allows non soc-camera hosts to use soc-camera-aware clients. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: fix compile breakage] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rename drivers/media/video as .../platformMauro Carvalho Chehab2012-08-151-1554/+0Star
| | | | | | | | | The remaining drivers are mostly platform drivers. Name the dir to reflect it. It makes sense to latter break it into a few other dirs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] move soc_camera i2c drivers into its own dirMauro Carvalho Chehab2012-08-1519-0/+15830
Move all soc_camera i2c drivers into drivers/media/i2c/soc_camera/. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>