aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/i2c
AgeCommit message (Collapse)Author
2013-10-14[media] adv7511: fix error return code in adv7511_probe()Wei Yongjun
Fix to return -ENOMEM in the new i2c client and create workqueue error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14[media] ths8200: fix compilation with GCC < 4.4.6Gianluca Gennari
Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14[media] ad9389b: fix compilation with GCC < 4.4.6Gianluca Gennari
Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14[media] adv7511: fix compilation with GCC < 4.4.6Gianluca Gennari
Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14[media] adv7842: fix compilation with GCC < 4.4.6Gianluca Gennari
Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-03[media] ml86v7667: fix compile warning: 'ret' set but not usedHans Verkuil
media_build/v4l/ml86v7667.c: In function 'ml86v7667_s_ctrl': media_build/v4l/ml86v7667.c:120:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ And indeed, ret is set but not used. Let's actually return the error code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-26[media] adv7511: add new video encoderHans Verkuil
This is an Analog Devices HDMI transmitter. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-26[media] adv7842: add new video decoder driverHans Verkuil
This is a Analog Devices Component/Graphics/SD Digitizer with 2:1 Multiplexed HDMI Receiver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ov9650: off by one in ov965x_enum_frame_sizes()Dan Carpenter
The ">" should be ">=" otherwise we read one space beyond the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] s5k6aa: off by one in s5k6aa_enum_frame_interval()Dan Carpenter
The check is off by one so we could read one space past the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ad9389b: set is_private only after successfully creating all controlsHans Verkuil
is_private was set right after creating each control, but the control pointer might be NULL in case of an error. Set it after all controls were successfully created, since that guarantees that all control pointers are non-NULL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: set is_private only after successfully creating all controlsHans Verkuil
is_private was set right after creating each control, but the control pointer might be NULL in case of an error. Set it after all controls were successfully created, since that guarantees that all control pointers are non-NULL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] v4l2-dv-timings: add callback to handle exceptionsHans Verkuil
In most cases the v4l2_bt_timings_cap struct has all the information necessary to determine valid timings, but occasionally there are exceptions. Add a callback function to be able to test for those exceptions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] v4l2-dv-timings: rename v4l2_dv_valid_timings to v4l2_valid_dv_timingsHans Verkuil
All other functions follow the v4l2_<foo>_dv_timings pattern, do the same for this function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604/ad9389b/ths8200: decrease min_pixelclock to 25MHzHans Verkuil
The CEA-861 standard allows for the 640x480 format at 25.175 MHz. Ensure that that's allowed according to the struct v4l2_bt_timings_cap. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] v4l2-dv-timings: rename v4l_match_dv_timings to v4l2_match_dv_timingsHans Verkuil
It's the only function in v4l2-dv-timings.c with the v4l prefix instead of v4l2. Make it consistent with the other functions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ad9389b/adv7604/ths8200: use new v4l2_print_dv_timings helperHans Verkuil
These three drivers all have code to log the dv_timings contents. Replace that code with the new helper function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ad9389b: change initial register configuration in ad9389b_setup()Mats Randgaard
- register 0x17: CSC scaling factor was set to +/- 2.0. This register is set by ad9389b_csc_conversion_mode() to the right value. - register 0x3b: bits for pixel repetition and CSC was set to zero, but that is the default value. Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: corrected edid crc-calculationMartin Bugge
Signed-off-by: Martin Bugge <marbugge@cisco.com> Reviewed-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ad9389b: trigger edid re-read by power-cycle chipMartin Bugge
Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] ad9389b: no monitor if EDID is wrongMats Randgaard
state->have_monitor is set to false if the EDID that is read from the monitor has too many segments or wrong CRC. Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: print flags and standards in timing informationMats Randgaard
Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: improve log_status for HDMI/DVI-D signalsMats Randgaard
Don't log if there is no signal. If there is a signal, then also log HDCP and audio status. Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: pixel-clock depends on deep-color-modeMartin Bugge
The frequency calculation has to take deep-color mode into account. While we're at it, also log the deep-color mode in log_status. Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] adv7604: debounce "format change" notificationsMats Randgaard
The bridge driver is only notified when the input status has changed since the previous interrupt. Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24[media] media: i2c: tvp7002: add OF supportLad, Prabhakar
add OF support for the tvp7002 driver. Signed-off-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>
2013-08-22[media] smiapp: Call the clock "ext_clk"Sakari Ailus
As the clock framework makes it possible to assign a device specific name to the clocks, remove the ability to use a named clock in the driver. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-22[media] smiapp: Prepare and unprepare clocks correctlySakari Ailus
Prepare clocks before enabling and unprepare after disabling them. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-22[media] smiapp-pll: Add a few comments to PLL calculationSakari Ailus
The PLL calculation heuristics is rather complicated and and is often difficult to understand to its original author. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-22[media] smiapp: re-use clamp_t instead of min(..., max(...))Andy Shevchenko
clamp_t does the job to put a variable into the given range. clamp_t -> clamp as agreed with Andy. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-22[media] mt9v032: Use the common clock frameworkLaurent Pinchart
Configure the device external clock using the common clock framework instead of a board code callback function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] V4L: s5c73m3: Add format propagation for TRY formatsAndrzej Hajda
Resolution set on ISP pad of S5C73M3-OIF subdev should be propagated to source pad for TRY and ACTIVE formats. The patch adds missing propagation for TRY format. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] V4L2: mt9m111: switch to asynchronous subdevice probingGuennadi Liakhovetski
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>
2013-08-18[media] V4L2: mt9t031: don't Oops if asynchronous probing is attemptedGuennadi Liakhovetski
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>
2013-08-18[media] saa7115: make multi-line comments compliant with CodingStyleMauro Carvalho Chehab
changeset 2ccf12a did a crappy job when added multi-line comment lines, violating CodingStyle. Change the comments added there to fulfill CodingStyle, and document the platform_data using Documentation/kernel-doc-nano-HOWTO.txt. Cc: Jon Arne Jørgensen <jonarne@jonarne.no> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] saa7115: Implement i2c_board_info.platform_dataJon Arne Jørgensen
This patch implements i2c_board_info.platform_data, and some options to override the default initialization table for the GM7113C and SAA7113 chips. Signed-off-by: Jon Arne Jørgensen <jonarne@jonarne.no> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] saa7115: Do not load saa7115_init_misc for gm7113cJon Arne Jørgensen
Most of the registers changed in saa7115_init_misc table are out of range for the gm7113c chip. The only register that's within range, don't need to be changed here. Signed-off-by: Jon Arne Jørgensen <jonarne@jonarne.no> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] saa7115: Fix saa711x_set_v4lstd for gm7113cJon Arne Jørgensen
saa711x_set_v4lstd would toggle several bits that should not be touched when changing std. This patch fixes this. Signed-off-by: Jon Arne Jørgensen <jonarne@jonarne.no> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] ths8200/ad9389b: use new dv_timings helpersHans Verkuil
Simplify the code by using the new dv_timings helpers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] v4l2: use new V4L2_DV_BT_BLANKING/FRAME definesHans Verkuil
Use the new defines to calculate the full blanking and frame sizes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] v4l2: move dv-timings related code to v4l2-dv-timings.cHans Verkuil
v4l2-common.c contained a bunch of dv-timings related functions. Move that to the new v4l2-dv-timings.c which is a more appropriate place for them. There aren't many drivers that do HDTV, so it is a good idea to separate common code related to that into a module of its own. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] ml86v7667: override default field interlace orderVladimir Barinov
ML86V7667 always transmits top field first for both PAL and NTSC -- that makes application incorrectly treat interlaced fields when relying on the standard. Hence we must set V4L2_FIELD_INTERLACED_TB format explicitly. [Sergei: added a comment.] Reported-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Tested-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] media: i2c: adv7343: add OF supportLad, Prabhakar
add OF support for the adv7343 driver. Signed-off-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>
2013-07-26[media] media: i2c: adv7343: make the platform data members as arrayLad, Prabhakar
This patch makes the platform data members as array wherever possible, so as this makes easier while collecting the data in DT case and read the entire array at once. This patch also makes appropriate changes to board-da850-evm.c Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] media: i2c: tvp514x: add support for asynchronous probingLad, Prabhakar
Both synchronous and asynchronous tvp514x subdevice probing is supported by this patch. This patch also fixes the error path by calling media_entity_cleanup() on failure in probe when CONFIG_MEDIA_CONTROLLER is enabled. Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] media: i2c: tvp7002: add support for asynchronous probingLad, Prabhakar
Both synchronous and asynchronous tvp7002 subdevice probing is supported by this patch. Signed-off-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>
2013-07-26[media] media: i2c: adv7343: add support for asynchronous probingLad, Prabhakar
Both synchronous and asynchronous adv7343 subdevice probing is supported by this patch. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] media: i2c: ths8200: add OF supportLad, Prabhakar
add OF support for the ths8200 driver. Signed-off-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>
2013-07-26[media] media: i2c: ths8200: support asynchronous probingLad, Prabhakar
This patch supports both synchronous and asynchronous ths8200 subdevice probing. Signed-off-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>
2013-07-13Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "This series contain: - new i2c video drivers: ml86v7667 (video decoder), ths8200 (video encoder) - a new video driver for EasyCap cards based on Fushicai USBTV007 - Improved support for OF and embedded systems, with V4L2 async initialization and a better support for clocks - API cleanups on the ioctls used by the v4l2 debug tool - Lots of cleanups - As usual, several driver improvements and new cards additions - Revert two changesets that change the minimal symbol rate for stv0399, as request by Manu - Update MAINTAINERS and other files to point to my new e-mail" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (378 commits) MAINTAINERS & ABI: Update to point to my new email [media] stb0899: restore minimal rate to 5Mbauds [media] exynos4-is: Correct colorspace handling at FIMC-LITE [media] exynos4-is: Set valid initial format on FIMC.n subdevs [media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads [media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev [media] exynos4-is: Set valid initial format at FIMC-LITE [media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs [media] MAINTAINERS: Update S5P/Exynos FIMC driver entry [media] Documentation: Update driver's directory in video4linux/fimc.txt [media] exynos4-is: Change fimc-is firmware file names [media] exynos4-is: Add support for Exynos5250 MIPI-CSIS [media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver [media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms [media] media: i2c: tvp514x: remove manual setting of subdev name [media] media: i2c: tvp7002: remove manual setting of subdev name [media] mem2mem: set missing v4l2_dev pointer [media] wl128x: add missing struct v4l2_device [media] tvp514x: Fix init seqeunce [media] saa7134: Fix sparse warnings by adding __user annotation ...