aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10[media] adv7511: add support to for the content type controlHans Verkuil1-2/+20
This transmitter now supports configuring the IT content type of the incoming video. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-10[media] adv7842: add support to for the content type controlHans Verkuil1-0/+20
This receiver now supports reading the IT content type of the incoming video. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-10[media] adv7604: add support to for the content type controlHans Verkuil1-0/+21
This receiver now supports reading the IT content type of the incoming video. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-10[media] media: i2c: adv7604: Use v4l2-dv-timings helpersJean-Michel Hautbois1-113/+65
Use the helper to enumerate and set DV timings instead of a custom code. This will ease debugging too, as it is consistent with other drivers. Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@veo-labs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-10[media] V4L: ov9650: fix control clustersGuennadi Liakhovetski1-2/+2
Auto-gain and auto-exposure clusters in the ov9650 driver have both a size of 2, not 3 controls. Fix this. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-10[media] media: i2c/adp1653: probe: fix erroneous return valueAnton Protopopov1-1/+1
The adp1653_probe() function may return positive value EINVAL which is obviously wrong. Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-09Merge tag 'v4.5-rc3' into patchworkMauro Carvalho Chehab2-3/+1
Linux 4.5-rc3 * tag 'v4.5-rc3': (644 commits) Linux 4.5-rc3 epoll: restrict EPOLLEXCLUSIVE to POLLIN and POLLOUT radix-tree: fix oops after radix_tree_iter_retry MAINTAINERS: trim the file triggers for ABI/API dax: dirty inode only if required thp: make deferred_split_scan() work again mm: replace vma_lock_anon_vma with anon_vma_lock_read/write ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup um: asm/page.h: remove the pte_high member from struct pte_t mm, hugetlb: don't require CMA for runtime gigantic pages mm/hugetlb: fix gigantic page initialization/allocation mm: downgrade VM_BUG in isolate_lru_page() to warning mempolicy: do not try to queue pages from !vma_migratable() mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress vmstat: make vmstat_update deferrable mm, vmstat: make quiet_vmstat lighter mm/Kconfig: correct description of DEFERRED_STRUCT_PAGE_INIT memblock: don't mark memblock_phys_mem_size() as __init dump_stack: avoid potential deadlocks mm: validate_mm browse_rb SMP race condition ...
2016-02-02[media] msp3400: use IS_ENABLED check instead of #ifArnd Bergmann1-1/+1
A recent patch broke the msp3400 driver when CONFIG_MEDIA_CONTROLLER is not set: drivers/media/i2c/msp3400-driver.h:107:5: error: "CONFIG_MEDIA_CONTROLLER" is not defined [-Werror=undef] It was clearly a typo, and this patch changes the "#if CONFIG_MEDIA_CONTROLLER" to a working IS_ENABLED() check. Fixes: fb4932821731 ("[media] msp3400: initialize MC data") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] media: i2c: Don't export ir-kbd-i2c module aliasJavier Martinez Canillas1-1/+0
This is a partial revert of commit ed8d1cf07cb16d ("[media] Export I2C module alias information in missing drivers") that exported the module aliases for the I2C drivers that were missing to make autoload to work. But there is a bug report [0] that auto load of the ir-kbd-i2c driver cause the Hauppauge HD-PVR driver to not behave correctly. This is a hdpvr latent bug that was just exposed by ir-kbd-i2c module autoloading working and will also happen if the I2C driver is built-in or a user calls modprobe to load the module and register the driver. But there is a regression experimented by users so until the real bug is fixed, let's not export the module alias for the ir-kbd-i2c driver even when this just masks the actual issue. [0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810726 Fixes: ed8d1cf07cb1 ("[media] Export I2C module alias information in missing drivers") Cc: <stable@vger.kernel.org> # 4.3+ Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-02-01[media] s5c73m3: remove duplicate module device tableArnd Bergmann1-1/+0
Clang complains about an extraneous definition of the module device table after the patch to add it was accidentally merged twice: ../drivers/media/i2c/s5c73m3/s5c73m3-spi.c:40:1: error: redefinition of '__mod_of__s5c73m3_spi_ids_device_table' MODULE_DEVICE_TABLE(of, s5c73m3_spi_ids); ^ ../include/linux/module.h:223:27: note: expanded from macro 'MODULE_DEVICE_TABLE' extern const typeof(name) __mod_##type##__##name##_device_table \ ^ <scratch space>:99:1: note: expanded from here __mod_of__s5c73m3_spi_ids_device_table This removes the second definition. Fixes: f934a94bb566 ("[media] s5c73m3: Export OF module alias information") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tvp7002: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas1-2/+4
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tvp514x: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas1-2/+4
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] s5k5baf: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas1-1/+4
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] s5c73m3: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas1-1/+3
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] adv7604: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas1-1/+6
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] media: adv7604: implement get_selectionUlrich Hecht1-0/+21
The rcar_vin driver relies on this. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tc358743: Use local array with fixed size in i2c writeMats Randgaard1-8/+8
i2c_wr() is called from ops and the interrupt service routine, while state->wr_data is shared and unprotected, and could be overwritten. This shared buffer is therefore replaced with a local array with fixed size. The array has the size of one EDID block (128 bytes) + 2 bytes i2c address, and the EDID is written block by block (up to 8 blocks). Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] vpx3220: signedness bug in vpx3220_fp_read()Dan Carpenter1-1/+1
The intent was to return -1 on error and that's what the callers expect but the current code returns USHRT_MAX instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tc358743: Print timings only when debug level is setMats Randgaard1-4/+5
Prevent unnecessary kernel log spamming. Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] mt9v011: add media controller supportMauro Carvalho Chehab1-0/+15
Create a source pad and set the media controller type to the sensor. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] saa7115: initialize demod type and add the needed padsMauro Carvalho Chehab1-0/+19
The saa7115 driver is used on several em28xx-based devices. Now that we're about to add MC support to em28xx, we need to be sure that the saa711x demod will be properly mapped at MC. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tvp5150: identify it as a MEDIA_ENT_F_ATV_DECODERMauro Carvalho Chehab1-0/+3
The tvp5150 is an analog TV decoder. Identify as such at the media graph, or otherwise devices using it would fail. That avoids the following warning: [ 1546.669139] usb 2-3.3: Entity type for entity tvp5150 5-005c was not initialized! Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] msp3400: initialize MC dataMauro Carvalho Chehab2-0/+19
Add pads and set the device type when used with the media controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] tvp5150: create the expected number of padsMauro Carvalho Chehab1-3/+8
The tvp5150 doesn't have just one pad. It has 3 ones: - IF input - Video output - VBI output Fix it and use the macros for the pad indexes. Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-29[media] tvp5150: Add pad-level subdev operationsLaurent Pinchart1-11/+42
This patch enables the tvp5150 decoder driver to be used with the media controller framework by adding pad-level subdev operations and init the media entity pad. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-01-29[media] tvp5150: fix tvp5150_fill_fmt()Laurent Pinchart1-2/+2
The tvp5150 output video is interlaced so mark the format field as alternate and reduce the height to the half. [javier: split patch and write commit message] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-01-26Revert "[media] tvp5150: Fix breakage for serial usage"Mauro Carvalho Chehab1-4/+5
This patch were a workaround for a regression at tvp5150, but it causes troubles on devices with omap3+tvp5151 when working in non-parallel bus mode. Now that em28xx was fixed, we can get rid of that. This reverts commit 47de9bf8931e6bf9c92fdba9867925d1ce482ab1. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] media: i2c: ov2659: speedup probe if no device connectedGrygorii Strashko1-5/+3
The ov2659 driver performs device detection and initialization in the following way: - send reset command REG_SOFTWARE_RESET - load array of predefined register's setting (~150 values) - read device version REG_SC_CHIP_ID_H/REG_SC_CHIP_ID_L - check version and exit if invalid. As result, for not connected device there will be >~150 i2c transactions executed before device version checking and exit (there are no failures detected because ov2659 declared as I2C_CLIENT_SCCB and NACKs are ignored in this case). Let's fix that by checking the chip version first and start initialization only if it's supported. Cc: Benoit Parrot <bparrot@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] mt9v032: Add reset and standby gpiosMarkus Pargmann1-0/+28
Add optional reset and standby gpios. The reset gpio is used to reset the chip in power_on(). The standby gpio is not used currently. It is just unset, so the chip is not in standby. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Fix breakage for serial usageMauro Carvalho Chehab1-5/+4
changeset 460b6c0831cb ("tvp5150: Add s_stream subdev operation support") broke for em28xx-based devices with uses tvp5150. On those devices, touching the TVP5150_MISC_CTL register causes em28xx to stop streaming. I suspect that it uses the 27 MHz clock provided by tvp5150 to feed em28xx. So, change the logic to do nothing on s_stream if the tvp5150 is not set up to work with V4L2_MBUS_PARALLEL. Tested with Hauppauge WinTV USB 2 model 42012 Rev. C186 (USB ID: 2040:4200). Cc: Javier Martinez Canillas <javier@osg.samsung.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Add OF match tableEduard Gavin1-0/+9
The Documentation/devicetree/bindings/media/i2c/tvp5150.txt DT binding doc lists "ti,tvp5150" as the device compatible string but the driver does not have an OF match table. Add the table to the driver so the I2C core can do an OF style match. Signed-off-by: Eduard Gavin <egavinc@gmail.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Configure data interface via DTJavier Martinez Canillas1-3/+63
The video decoder supports either 8-bit 4:2:2 YUV with discrete syncs or 8-bit ITU-R BT.656 with embedded syncs output format but currently BT.656 it's always reported. Allow to configure the format to use via either platform data or a device tree definition. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Initialize the chip on probeJavier Martinez Canillas1-0/+35
After power-up, the tvp5150 decoder is in a unknown state until the RESETB pin is driven LOW which reset all the registers and restarts the chip's internal state machine. The init sequence has some timing constraints and the RESETB signal can only be used if the PDN (Power-down) pin is first released. So, the initialization sequence is as follows: 1- PDN (active-low) is driven HIGH so the chip is power-up 2- A 20 ms delay is needed before sending a RESETB (active-low) signal. 3- The RESETB pulse duration is 500 ns. 4- A 200 us delay is needed for the I2C client to be active after reset. This patch used as a reference the logic in the IGEPv2 board file from the ISEE 2.6.37 vendor tree. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Add g_mbus_config subdev operation supportLaurent Pinchart1-0/+11
This patch adds the .g_mbus_config subdev operation to the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Add s_stream subdev operation supportLaurent Pinchart1-0/+16
This patch adds the .s_stream subdev operation to the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Add pixel rate control supportLaurent Pinchart1-1/+4
This patch adds support for the V4L2_CID_PIXEL_RATE control. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Add tvp5151 supportLaurent Pinchart1-0/+2
Expand the version detection code to identity the tvp5151. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] tvp5150: Restructure version detectionLaurent Pinchart1-34/+45
Move the version detection code to a separate function and restructure it to prepare for TVP5151 support. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] s5k6a3: Fix VIDIOC_SUBDEV_G_FMT ioctl for TRY formatJacek Anaszewski1-2/+1
VIDIOC_SUBDEV_G_FMT ioctl should return TRY format previously set with VIDIOC_SUBDEV_S_FMT. Currently it is not the case as only ACTIVE formats are saved in the driver. Since the driver doesn't alter hardware state in the set_fmt op anyway, the op can save the format in both TRY and ACTIVE case. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] soc_camera: constify v4l2_subdev_sensor_ops structuresJulia Lawall3-3/+3
The v4l2_subdev_sensor_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media framework: rename pads init function to media_entity_pads_init()Mauro Carvalho Chehab27-31/+31
With the MC next gen rework, what's left for media_entity_init() is to just initialize the PADs. However, certain devices, like a FLASH led/light doesn't have any input or output PAD. So, there's no reason why calling media_entity_init() would be mandatory. Also, despite its name, what this function actually does is to initialize the PADs data. So, rename it to media_entity_pads_init() in order to reflect that. The media entity actual init happens during entity register, at media_device_register_entity(). We should move init of num_links and num_backlinks to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] uapi/media.h: Rename entities types to functionsMauro Carvalho Chehab17-20/+20
Rename the userspace types from MEDIA_ENT_T_ to MEDIA_ENT_F_ and add the backward compatibility bits. The changes at the .c files was generated by the following coccinelle script: @@ @@ -MEDIA_ENT_T_UNKNOWN +MEDIA_ENT_F_UNKNOWN @@ @@ -MEDIA_ENT_T_DVB_BASE +MEDIA_ENT_F_DVB_BASE @@ @@ -MEDIA_ENT_T_V4L2_BASE +MEDIA_ENT_F_V4L2_BASE @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_BASE +MEDIA_ENT_F_V4L2_SUBDEV_BASE @@ @@ -MEDIA_ENT_T_CONNECTOR_BASE +MEDIA_ENT_F_CONNECTOR_BASE @@ @@ -MEDIA_ENT_T_V4L2_VIDEO +MEDIA_ENT_F_IO_V4L @@ @@ -MEDIA_ENT_T_V4L2_VBI +MEDIA_ENT_F_IO_VBI @@ @@ -MEDIA_ENT_T_V4L2_SWRADIO +MEDIA_ENT_F_IO_SWRADIO @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN +MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN @@ @@ -MEDIA_ENT_T_CONN_RF +MEDIA_ENT_F_CONN_RF @@ @@ -MEDIA_ENT_T_CONN_SVIDEO +MEDIA_ENT_F_CONN_SVIDEO @@ @@ -MEDIA_ENT_T_CONN_COMPOSITE +MEDIA_ENT_F_CONN_COMPOSITE @@ @@ -MEDIA_ENT_T_CONN_TEST +MEDIA_ENT_F_CONN_TEST @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_SENSOR +MEDIA_ENT_F_CAM_SENSOR @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_FLASH +MEDIA_ENT_F_FLASH @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_LENS +MEDIA_ENT_F_LENS @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_DECODER +MEDIA_ENT_F_ATV_DECODER @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_TUNER +MEDIA_ENT_F_TUNER @@ @@ -MEDIA_ENT_T_DVB_DEMOD +MEDIA_ENT_F_DTV_DEMOD @@ @@ -MEDIA_ENT_T_DVB_DEMUX +MEDIA_ENT_F_TS_DEMUX @@ @@ -MEDIA_ENT_T_DVB_TSOUT +MEDIA_ENT_F_IO_DTV @@ @@ -MEDIA_ENT_T_DVB_CA +MEDIA_ENT_F_DTV_CA @@ @@ -MEDIA_ENT_T_DVB_NET_DECAP +MEDIA_ENT_F_DTV_NET_DECAP Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media-entity.h: rename entity.type to entity.functionMauro Carvalho Chehab14-17/+17
Entities should have one or more functions. Calling it as a type proofed to not be correct, as an entity could eventually have more than one type. So, rename the field as function. Please notice that this patch doesn't extend support for multiple function entities. Such change will happen when we have real case drivers using it. No functional changes. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] s5k5baf: fix subdev typeMauro Carvalho Chehab1-1/+1
The driver creates two subdevs, one for the image sensor pixel array (and the related readout logic) and one for an ISP. The first subdev already uses the MEDIA_ENT_T_V4L2_SUBDEV_SENSOR type, but the second subdev isn't a sensor pixel array. So, rename the second subdev as MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] s5c73m3: fix subdev typeMauro Carvalho Chehab1-2/+2
This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating some subdevs with a non-existing type. As this is a sensor driver, one of the entries is MEDIA_ENT_T_CAM_SENSOR. The other one will be using MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN, because the subdev is not any of the already existing types. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] smiapp: create pad links after subdev registrationJavier Martinez Canillas1-10/+10
The smiapp driver creates the pads links before the media entity is registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Move entity registration logic before pads links creation. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: rename the function that create pad linksMauro Carvalho Chehab3-5/+5
With the new API, a link can be either between two PADs or between an interface and an entity. So, we need to use a better name for the function that create links between two pads. So, rename the such function to media_create_pad_link(). No functional changes. This patch was created via this shell script: for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a $i; done Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: get rid of unused "extra_links" param on media_entity_init()Mauro Carvalho Chehab27-30/+30
Currently, media_entity_init() creates an array with the links, allocated at init time. It provides a parameter (extra_links) that would allocate more links than the current needs, but this is not used by any driver. As we want to be able to do dynamic link allocation/removal, we'll need to change the implementation of the links. So, before doing that, let's first remove that extra unused parameter, in order to cleanup the interface first. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cs3308: add new 8-channel volume control driverHans Verkuil3-0/+149
Add simple support for this 8 channel volume control driver. Currently all it does is to unmute all 8 channels. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx25840: initialize the standard to NTSC_MHans Verkuil1-1/+2
This is necessary since the *_std_setup functions rely on a valid state->std field. Also fix the cx23888_std_setup() to test for 60Hz instead of NTSC, just like cx25840_std_setup() does. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>