summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-01[media] sliced vbi: subdevs shouldn't clear the full v4l2_sliced_vbi_format ↵Hans Verkuil4-4/+6
struct Various subdevs cleared the full v4l2_sliced_vbi_format struct, when only the service_set/lines fields should have been cleared. Due to this the io_size field was wrongly cleared to 0, causing a v4l2-compliance error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_modeSylwester Nawrocki2-4/+4
Fixes following warnings on 64-bit architectures: m5mols.h: In function 'm5mols_set_ctrl_mode': m5mols.h:326:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] m5mols.h: In function 'm5mols_get_ctrl_mode': m5mols.h:331:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/i2c/m5mols/m5mols_controls.c:466:2: warning: cast from pointer to integer of different size Cc: Heungjun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Add missing free_irq() on error pathSylwester Nawrocki1-1/+3
Make sure the interrupt is freed when driver probing fails. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27[media] msp3400: convert struct i2c_msg initialization to C99 formatShubhrajyoti D1-6/+34
Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27[media] tvaudio: convert struct i2c_msg initialization to C99 formatShubhrajyoti D1-2/+11
Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27[media] ks0127: convert struct i2c_msg initialization to C99 formatShubhrajyoti D1-2/+11
Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] tvaudio: add back lost tda9875 copyrightHans Verkuil1-0/+4
When the separate tda9875 driver was merged into tvaudio the copyright line of the tda9875 driver was dropped inadvertently. Add it back. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] smiapp: Provide module identification information through sysfsSakari Ailus1-2/+26
Provide module ident information through sysfs. Signed-off-by: Sakari Ailus <sakari.ailus@iki.if> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] smiapp: Use highest bits-per-pixel for sensor internal formatSakari Ailus1-1/+5
The format shown on the links internal to the sensor was the first one enumerated from the sensor, not the highest bit depth data that can be produced by the sensor. Correct this. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] smiapp: Remove unused functionSachin Kamat1-20/+0
smiapp_replace_limit_at() function is not called by the driver. This was detected by sparse as: drivers/media/i2c/smiapp/smiapp-quirk.c:64:5: warning: symbol 'smiapp_replace_limit_at' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] smiapp: Use devm_* functions in smiapp-core.c fileSachin Kamat1-36/+11
devm_* functions are device managed functions and make code a bit smaller and cleaner. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] Add v4l2 subdev driver for S5K4ECGX sensorSangwook Lee3-0/+1044
This patch adds driver for Samsung S5K4ECGX image sensor with an embedded SoC ISP. The driver only implements preview operation mode and still capture (snapshot) and face detection features are missing now. Following controls are supported: contrast, saturation, brightness, sharpness. Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] v4l2: make vidioc_s_crop constHans Verkuil9-35/+35
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>
2012-09-26[media] v4l2: remove experimental tag from a number of old driversHans Verkuil1-2/+2
A number of old drivers still had the experimental tag. Time to remove it. It concerns the following drivers: VIDEO_TLV320AIC23B USB_STKWEBCAM VIDEO_CX18 VIDEO_CX18_ALSA VIDEO_ZORAN_AVS6EYES DVB_USB_AF9005 MEDIA_TUNER_TEA5761 VIDEO_NOON010PC30 This decision was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23[media] drivers/media/i2c/tea6415c.c: removes unnecessary semicolonPeter Senna Tschudin1-2/+2
removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-14[media] mt9m032.c: introduce missing initializationJulia Lawall1-1/+1
The result of one call to a function is tested, and then at the second call to the same function, the previous result, and not the current result, is tested again. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ret; identifier f; statement S1,S2; @@ *ret = f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S1 ... when any *f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S2 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-14[media] m5mols: introduce missing initializationJulia Lawall1-1/+1
The result of one call to a function is tested, and then at the second call to the same function, the previous result, and not the current result, is tested again. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ret; identifier f; statement S1,S2; @@ *ret = f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S1 ... when any *f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S2 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] mt9p031: Fix horizontal and vertical blanking configurationLaurent Pinchart1-6/+6
Compute the horizontal blanking value according to the datasheet. The value written to the hblank and vblank registers must be equal to the number of blank columns and rows minus one. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] mt9v032: Export horizontal and vertical blanking as V4L2 controlsLaurent Pinchart1-3/+32
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] mt9v032: Provide link frequency controlLaurent Pinchart1-5/+43
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] mt9v032: Provide pixel rate controlSakari Ailus1-2/+25
Provide pixel rate control calculated from external clock and horizontal binning factor. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] ad9389b: driver for the Analog Devices AD9389B video encoderHans Verkuil3-0/+1340
Initial version of this driver. The full datasheets are available from the Analog Devices website: http://ez.analog.com/docs/DOC-1741 Not all features of the receiver are supported by this driver for various reasons. Most notably: - No CEC support (the CEC API needs a lot more discussion) - No HDCP repeater support (we don't use that either) I'm sure that there are more things missing, but this driver does work well for our hardware. Note that I am using the register addresses instead of register names: the datasheet containing the register descriptions is organized by register address. Using names would make the datasheet lookup very hard. An attempt was made to try and document what is being done when registers are used instead. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13[media] adv7604: driver for the Analog Devices ADV7604 video decoderHans Verkuil3-0/+1972
Initial version of this driver. The full datasheets are available from the Analog Devices website: http://ez.analog.com/docs/DOC-1545 Not all features of the receiver are supported by this driver for various reasons. Most notably: - No CEC support (the CEC API needs a lot more discussion) - Only port A of the four HDMI input ports is implemented (our hardware only uses that port) - No HDCP repeater support (we don't use that either) And since there are some 600-odd pages of datasheet for this single device, I'm sure that there are many more things missing, but this driver does work well for our hardware. Note that I am using the register addresses instead of register names: the datasheet containing the register descriptions is organized by register address. Using names would make the datasheet lookup very hard. An attempt was made to try and document what is being done when registers are used instead. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Add missing help for some menuconfig itemsMauro Carvalho Chehab1-1/+1
Help was missing during some items reorganization. Add them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Kconfig: merge all customise options into just oneMauro Carvalho Chehab1-15/+6
Instead of having 3 options to allow customizing the media sub-drivers (tuners, I2C drivers, frontends), merge all of them into just one. That simplifies the life for users, as they can just keep this untouched. Life for developers is also simpler, as there's now just one Kconfig item to remember, for the ancillary sub-drivers providing supports for chips that could change from one board design to another. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Cleanup media Kconfig filesMauro Carvalho Chehab1-1/+1
- get rid of ridden V4L2_COMMON symbol This symbol is not needed anymore; it can be folded with V4L2 one, simplifying the Kconfig a little bit; - Comment why some Kconfig items are needed; - Remove if test for MEDIA_CAMERA_SUPPORT, replacing it by depends on. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21sh_mobile_csi2: move it to the right placeMauro Carvalho Chehab1-398/+0
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>
2012-08-15[media] mt9v022: Add support for mt9v024Alex Gershgorin2-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>
2012-08-15[media] ov772x: Stop sensor readout right after resetLaurent Pinchart1-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>
2012-08-15[media] ov772x: Compute window size registers at runtimeLaurent Pinchart1-95/+67
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>
2012-08-15[media] ov772x: Add support for SBGGR10 formatLaurent Pinchart1-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>
2012-08-15[media] ov772x: Add ov772x_read() and ov772x_write() functionsLaurent Pinchart1-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>
2012-08-15[media] ov772x: Make to_ov772x convert from v4l2_subdev to ov772x_privLaurent Pinchart1-11/+10
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>
2012-08-15[media] ov772x: try_fmt must not default to the current formatLaurent Pinchart1-29/+7
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>
2012-08-15[media] ov772x: Don't fail in s_fmt if the requested format isn't supportedLaurent Pinchart1-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>
2012-08-15[media] ov772x: Select the default format at probe timeLaurent Pinchart1-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>
2012-08-15[media] ov772x: Fix memory leak in probe error pathLaurent Pinchart1-5/+4
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>
2012-08-15[media] soc-camera: Push probe-time power management to driversLaurent Pinchart14-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>
2012-08-15[media] soc-camera: Add and use soc_camera_power_[on|off]() helper functionsLaurent Pinchart14-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>
2012-08-15[media] rename drivers/media/video as .../platformMauro Carvalho Chehab1-1554/+0
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>
2012-08-15[media] move soc_camera i2c drivers into its own dirMauro Carvalho Chehab21-0/+15835
Move all soc_camera i2c drivers into drivers/media/i2c/soc_camera/. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move i2c files into drivers/media/i2cMauro Carvalho Chehab104-0/+58004
Move ancillary I2C drivers into drivers/media/i2c, in order to better organize them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>