summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
AgeCommit message (Collapse)Author
2012-09-23[media] drivers/media/i2c/tea6415c.c: removes unnecessary semicolonPeter Senna Tschudin
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 Lawall
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 Lawall
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 Pinchart
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 Pinchart
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 Pinchart
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 Ailus
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 Verkuil
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 Verkuil
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 Chehab
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 Chehab
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 Chehab
- 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 Chehab
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 Gershgorin
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Chehab
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 Chehab
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 Chehab
Move ancillary I2C drivers into drivers/media/i2c, in order to better organize them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>