summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
Commit message (Collapse)AuthorAgeFilesLines
* [media] smiapp: Drop BUG_ON() in suspend pathSakari Ailus2016-10-211-2/+0Star
| | | | | | | | | Checking that the mutex is not acquired is unnecessary for user processes are stopped by this point. Drop the check. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp-pll: Don't complain aloud about failing PLL calculationSakari Ailus2016-10-211-1/+2
| | | | | | | | | | | | Don't complain about a failure to compute the pre_pll divisor. The function is used to determine whether a particular combination of bits per sample value and a link frequency can be used, in which case there are lots of unnecessary driver messages. During normal operation the failure generally does not happen. Use dev_dbg() instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Drop a debug print on frame size and bit depthSakari Ailus2016-10-211-6/+0Star
| | | | | | | | | The first time the sensor is powered on, the information is not yet available. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Obtain correct media bus code for try formatSakari Ailus2016-10-211-3/+1Star
| | | | | | | | | | The media bus code obtained for try format may have been a code that the sensor did not even support. Use a supported code with the current pixel order. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Remove useless newlines and other small cleanupsSakari Ailus2016-10-211-20/+13Star
| | | | | | | | | | | The code probably has been unindented at some point but rewrapping has not been done. Do it now. Also remove a useless memory allocation failure message. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Improve debug messages from frame layout readingSakari Ailus2016-10-211-11/+8Star
| | | | | | | | Provide more debugging information on reading the frame layout. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Obtain frame layout from the frame descriptorSakari Ailus2016-10-212-21/+30
| | | | | | | | | | Besides the image data, SMIA++ compliant sensors also provide embedded data in form of registers used to capture the image. Store this information for later use in frame descriptor and routing. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Use SMIAPP_PADS when referring to number of padsSakari Ailus2016-10-211-2/+2
| | | | | | | | | Replace plain value 2 with SMIAPP_PADS when referring to the number of pads. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Unify setting up sub-devicesSakari Ailus2016-10-211-4/+1Star
| | | | | | | | | | The initialisation of the source sub-device is somewhat different as it's not created by the smiapp driver itself. Remove redundancy in initialising the two kind of sub-devices. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Read frame format earlierSakari Ailus2016-10-211-2/+6
| | | | | | | | | | The information gathered during frame format reading will be required earlier in the initialisation when it was available. Also return an error if frame format cannot be obtained. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Merge smiapp_init() with smiapp_probe()Sakari Ailus2016-10-211-219/+204Star
| | | | | | | | The smiapp_probe() is the sole caller of smiapp_init(). Unify the two. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Fix resource management in registration failureSakari Ailus2016-10-211-1/+21
| | | | | | | | | | If the registered() callback failed, resources were left unaccounted for. Fix this, as well as add unregistering the sub-devices in driver unregistered() callback. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Always initialise the sensor in probeSakari Ailus2016-10-211-25/+5Star
| | | | | | | | | | | | Initialise the sensor in probe. The reason why it wasn't previously done in case of platform data was that the probe() of the driver that provided the clock through the set_xclk() callback would need to finish before the probe() function of the smiapp driver. The set_xclk() callback no longer exists. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Remove unnecessary BUG_ON()'sSakari Ailus2016-10-212-12/+20
| | | | | | | | | Instead, calculate how much is needed and then allocate the memory dynamically. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Provide a common function to obtain native pixel array sizeSakari Ailus2016-10-211-20/+19Star
| | | | | | | | | | The same pixel array size is required for the active format of each sub-device sink pad and try format of each sink pad of each opened file handle as well as for the native size rectangle. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Split off sub-device registration into twoSakari Ailus2016-10-211-37/+45
| | | | | | | | | Remove the loop in sub-device registration and create each sub-device explicitly instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Initialise media entity after sensor initSakari Ailus2016-10-211-5/+5
| | | | | | | | | This allows determining the number of pads in the entity based on the sensor. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Explicitly define number of pads in initialisationSakari Ailus2016-10-211-10/+7Star
| | | | | | | | Define the number of pads explicitly in initialising the sub-devices. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Move sub-device initialisation into a separate functionSakari Ailus2016-10-211-59/+51Star
| | | | | | | | | Simplify smiapp_init() by moving the initialisation of individual sub-devices to a separate function. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [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] smiapp: don't break long linesMauro Carvalho Chehab2016-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx25840: don't break long linesMauro Carvalho Chehab2016-10-212-12/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] tvaudio: mark printk continuation lines as suchMauro Carvalho Chehab2016-10-211-2/+3
| | | | | | | | | This driver has printk continuation lines for debugging purposes. Since commit 563873318d32 ("Merge branch 'printk-cleanups'"), this won't work as expected anymore. So, let's add KERN_CONT to those lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] rc: Hauppauge z8f0811 can decode RC6Sean Young2016-09-221-30/+60
| | | | | | | The hardware does not decode the 16, 20 or 24 bit variety. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] s5c73m3: Fix entity function assignment for the OIF subdevSylwester Nawrocki2016-09-221-1/+1
| | | | | | | | Suppresses warnings like: s5p-fimc-md camera: Entity type for entity S5C73M3-OIF was not initialized! Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] s5k6a3: Add missing entity function initializationSylwester Nawrocki2016-09-221-0/+1
| | | | | | | | Suppresses warning like: s5p-fimc-md camera: Entity type for entity S5K6A3 13-0010 was not initialized! Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: fill in mbus format in set_fmtNiklas Söderlund2016-09-191-2/+4
| | | | | | | | | If the V4L2_SUBDEV_FORMAT_TRY is used in set_fmt the width, height etc would not be filled. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7180: rcar-vin: change mbus format to UYVYNiklas Söderlund2016-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The media bus format reported by the adv7180 is wrong. Steve Longerbeam posted a patch which changed the format to UYVY8_2X8 with the commit message: Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors now look correct when capturing with the i.mx6 backend. The other option is to set the SWPC bit in register 0x27 to swap the Cr and Cb output samples. The rcar-vin driver was developed and tested with the adv7180 and therefor suffers from the same issue, looking for the wrong media bus format. The two errors corrected each other. This patch takes Steve's patch and merge it with a fix for rcar-vin driver. The rcar-vin driver is used used in together with the adv7180 och Koelsch and this ensures it will not break while fixing the adv7180 issue. I checked wit Steve and he was fine with me merging the patches. ADV7180 parts: Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Suggested-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: use __maybe_unused for PM functionsArnd Bergmann2016-09-191-11/+2Star
| | | | | | | | | | | | | | | | | | The new ad5820 driver uses #ifdef to hide the suspend/resume functions, but gets it wrong when CONFIG_PM_SLEEP is disabled: drivers/media/i2c/ad5820.c:286:12: error: 'ad5820_resume' defined but not used [-Werror=unused-function] drivers/media/i2c/ad5820.c:274:12: error: 'ad5820_suspend' defined but not used [-Werror=unused-function] This replaces the #ifdef with a __maybe_unused annotation that is simpler and harder to get wrong, avoiding the warning. Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus coil") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] constify local structuresJulia Lawall2016-09-191-1/+1
| | | | | | | | | | | | | | | | | | | For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <joe@perches.com>. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ov9650: add support for asynchronous probingJavier Martinez Canillas2016-09-191-1/+6
| | | | | | | | | | Allow the sub-device to be probed asynchronously so a bridge driver that's waiting for the device can be notified and its .bound callback executed. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: H . Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media Kconfig: improve the spi integrationHans Verkuil2016-09-191-1/+1
| | | | | | | | The SPI driver looked a bit lonely in the config menu, and it didn't support the autoselect. Shift things around a bit so it looks more logical. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: Use bool for boolean valuesSakari Ailus2016-09-091-9/+10
| | | | | | | | The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Add support for 14 and 16 bits per sample depthsSakari Ailus2016-09-092-1/+9
| | | | | | | | SMIA++ supports 14 and 16 bits per pixel formats as well. Add support to these formats in the driver. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: move mt9m111 out of soc_cameraRobert Jarzmik2016-09-095-3/+13
| | | | | | | | | | 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] media/i2c: Delete owner assignmentMarkus Elfring2016-09-0611-11/+0Star
| | | | | | | | | | The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Remove set_xclk() callback from hwconfigSakari Ailus2016-09-051-32/+17Star
| | | | | | | | | The clock framework is generally so well supported that there's no reason to keep this one around. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Switch to gpiod API for GPIO controlSakari Ailus2016-09-052-25/+12Star
| | | | | | | | Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Constify the regs argument to smiapp_write_8s()Sakari Ailus2016-09-051-7/+5Star
| | | | | | | | The data may now be const as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtainedSakari Ailus2016-09-051-2/+3
| | | | | | | | | The clock may be provided by a driver which is yet to probe. Print the actual error code as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Rename smiapp_platform_data as smiapp_hwconfigSakari Ailus2016-09-053-73/+73
| | | | | | | | | This is really configuration to the driver originating from DT or elsewhere. Do not call it platform data. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Unify enforced and need-based 8-bit readSakari Ailus2016-09-051-11/+11
| | | | | | | | Unify enforced 8-bit read access with that based on actual need. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] tvp5150: use sd internal ops .registered instead .registered_asyncJavier Martinez Canillas2016-08-241-2/+6
| | | | | | | | | | | | | | | | | The driver is using the struct v4l2_subdev_core_ops .registered_async callback to register the connector entities and create the pad links after the subdev entity has been registered with the media device. But the .registered_async callback isn't needed since the v4l2 core already calls the struct v4l2_subdev_internal_ops .registered callback in v4l2_device_register_subdev(), after media_device_register_entity(). So, use the .registered() callback instead of the .registered_async() that is going to be removed in a following patch since isn't needed. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: fix error return code in adv7511_probe()Wei Yongjun2016-08-241-0/+1
| | | | | | | | Fix to return error code -ENOMEM from the i2c client register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] v4l2-subdev: rename cropcap to g_pixelaspectHans Verkuil2016-08-241-6/+6
| | | | | | | | The old cropcap video op is now only used to pass the pixelaspect ratio, so rename it. 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-2416-426/+427
| | | | | | | | | | | | | | 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] media: adv7180: add power pin controlSteve Longerbeam2016-08-242-1/+28
| | | | | | | | | | | Some targets control the ADV7180 power pin via a gpio, so add optional support for "powerdown" pin control. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Tested-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: define more registersSteve Longerbeam2016-08-241-24/+49
| | | | | | | | | | Replace hard-coded addresses with new register macro defines. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>