#
cacdd6a4 |
| 14-Apr-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: return I2C write operation failure to callers
The tvp5150_write() function calls i2c_smbus_write_byte_data() that can fail but does not propagate the error to the caller. Instead it
[media] tvp5150: return I2C write operation failure to callers
The tvp5150_write() function calls i2c_smbus_write_byte_data() that can fail but does not propagate the error to the caller. Instead it just prints a debug, so callers can't know if the operation failed.
So change the function to return the error code to the caller so it knows that the write failed and also print an error instead of just printing a debug information.
While being there remove the inline keyword from tvp5150_write() to make it consistent with tvp5150_read() and also because it's called in a lot of places, so making inline is in fact counter productive since it makes the kernel image size to be much bigger (~16 KiB).
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
60ad7689 |
| 19-Feb-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] tvp5150: don't go past decoder->input_ent array
drivers/media/i2c/tvp5150.c:1394 tvp5150_parse_dt() warn: buffer overflow 'decoder->input_ent' 3 <= 3
Reviewed-by: Javier Martinez Canillas <
[media] tvp5150: don't go past decoder->input_ent array
drivers/media/i2c/tvp5150.c:1394 tvp5150_parse_dt() warn: buffer overflow 'decoder->input_ent' 3 <= 3
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
c43875f6 |
| 12-Feb-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] tvp5150: replace MEDIA_ENT_F_CONN_TEST by a control
MEDIA_ENT_F_CONN_TEST is not really a connector, it is actually a signal generator. Also, as other drivers use the V4L2_CID_TEST_PATTERN c
[media] tvp5150: replace MEDIA_ENT_F_CONN_TEST by a control
MEDIA_ENT_F_CONN_TEST is not really a connector, it is actually a signal generator. Also, as other drivers use the V4L2_CID_TEST_PATTERN control for signal generators, let's change the driver accordingly.
Tested with Terratec Grabster AV350.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
f7b4b54e |
| 05-Feb-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: add HW input connectors support
The tvp5150 decoder has different input connectors. The actual list of HW inputs depends on the device version but all have at least these 3:
1) Com
[media] tvp5150: add HW input connectors support
The tvp5150 decoder has different input connectors. The actual list of HW inputs depends on the device version but all have at least these 3:
1) Composite0 2) Composite1 3) S-Video
and some variants have a 4th possible input connector:
4) Signal generator
The driver currently uses the .s_routing callback to switch the input connector but since these are separate HW blocks, it's better to use media entities to represent the input connectors and their source pads linked with the decoder's sink pad.
This allows user-space to use the MEDIA_IOC_SETUP_LINK ioctl to choose the input connector. For example using the media-ctl user-space tool:
$ media-ctl -r -l '"Composite0":0->"tvp5150 1-005c":0[1]'
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
b802fb99 |
| 05-Feb-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: move input definition header to dt-bindings
Add a header file for the tvp5150 input connectors constants that can be shared between the driver and Device Tree source files.
[mcheha
[media] tvp5150: move input definition header to dt-bindings
Add a header file for the tvp5150 input connectors constants that can be shared between the driver and Device Tree source files.
[mchehab@osg.samsung.com: rename tvp5150.h also at em28xx-cards.c] Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
82275133 |
| 05-Feb-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: store dev id and rom version
Not all tvp5150 variants support the same, for example some have an internal signal generator that can output a black screen.
So the device id and rom
[media] tvp5150: store dev id and rom version
Not all tvp5150 variants support the same, for example some have an internal signal generator that can output a black screen.
So the device id and rom version have to be stored in the driver's state to know what variant is a given device.
While being there, remove some redundant comments about the device version since there is already calls to v4l2_info() with that info.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
2bd5e437 |
| 05-Feb-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: put endpoint node on error
If the parallel mbus configuration is not correct, the endpoint device node isn't currently put again in the error path. Fix it.
Signed-off-by: Javier Ma
[media] tvp5150: put endpoint node on error
If the parallel mbus configuration is not correct, the endpoint device node isn't currently put again in the error path. Fix it.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
f92c70ad |
| 27-Jan-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] tvp5150: identify it as a MEDIA_ENT_F_ATV_DECODER
The tvp5150 is an analog TV decoder. Identify as such at the media graph, or otherwise devices using it would fail.
That avoids the followi
[media] tvp5150: identify it as a MEDIA_ENT_F_ATV_DECODER
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>
show more ...
|
#
55606310 |
| 27-Jan-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] tvp5150: create the expected number of pads
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.
R
[media] tvp5150: create the expected number of pads
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>
show more ...
|
#
e545ac87 |
| 26-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Add pad-level subdev operations
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
[media] tvp5150: Add pad-level subdev operations
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>
show more ...
|
#
4f57d27b |
| 26-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: fix tvp5150_fill_fmt()
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
[media] tvp5150: fix tvp5150_fill_fmt()
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>
show more ...
|
#
841502d7 |
| 26-Jan-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
Revert "[media] tvp5150: Fix breakage for serial usage"
This patch were a workaround for a regression at tvp5150, but it causes troubles on devices with omap3+tvp5151 when working in non-parallel bu
Revert "[media] tvp5150: Fix breakage for serial usage"
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>
show more ...
|
#
47de9bf8 |
| 25-Jan-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] tvp5150: Fix breakage for serial usage
changeset 460b6c0831cb ("tvp5150: Add s_stream subdev operation support") broke for em28xx-based devices with uses tvp5150. On those devices, touching
[media] tvp5150: Fix breakage for serial usage
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>
show more ...
|
#
7ef930a7 |
| 07-Jan-2016 |
Eduard Gavin <egavinc@gmail.com> |
[media] tvp5150: Add OF match table
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 m
[media] tvp5150: Add OF match table
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>
show more ...
|
#
a2e5f1b3 |
| 07-Jan-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: Configure data interface via DT
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
[media] tvp5150: Configure data interface via DT
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>
show more ...
|
#
09aa2609 |
| 07-Jan-2016 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: Initialize the chip on probe
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 inter
[media] tvp5150: Initialize the chip on probe
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>
show more ...
|
#
dd3a46bb |
| 07-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Add g_mbus_config subdev operation support
This patch adds the .g_mbus_config subdev operation to the driver.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Si
[media] tvp5150: Add g_mbus_config subdev operation support
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>
show more ...
|
#
460b6c08 |
| 07-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Add s_stream subdev operation support
This patch adds the .s_stream subdev operation to the driver.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-b
[media] tvp5150: Add s_stream subdev operation support
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>
show more ...
|
#
b1950b8d |
| 07-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Add pixel rate control support
This patch adds support for the V4L2_CID_PIXEL_RATE control.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javie
[media] tvp5150: Add pixel rate control support
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>
show more ...
|
#
05676b3e |
| 07-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Add tvp5151 support
Expand the version detection code to identity the tvp5151.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Ca
[media] tvp5150: Add tvp5151 support
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>
show more ...
|
#
7871597a |
| 07-Jan-2016 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
[media] tvp5150: Restructure version detection
Move the version detection code to a separate function and restructure it to prepare for TVP5151 support.
Signed-off-by: Laurent Pinchart <laurent.pin
[media] tvp5150: Restructure version detection
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>
show more ...
|
Revision tags: openbmc-20151210-1, openbmc-20151202-1, openbmc-20151123-1, openbmc-20151118-1 |
|
#
b5dcee22 |
| 10-Nov-2015 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] include/media: split I2C headers from V4L2 core
Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes ha
[media] include/media: split I2C headers from V4L2 core
Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes harder to identify what core headers should be documented and what headers belong to I2C drivers that are included only by bridge/main drivers that would require the functions provided by them.
Let's move those i2c specific files to its own subdirectory.
The files to move were produced via the following script: mkdir include/media/i2c (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done
And the references corrected via this script: MAIN_DIR="media/" PREV_DIR="media/" DIRS="i2c/"
echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script
Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
show more ...
|
Revision tags: openbmc-20151104-1, v4.3, openbmc-20151102-1, openbmc-20151028-1 |
|
#
c7d97499 |
| 21-Sep-2015 |
Javier Martinez Canillas <javier@osg.samsung.com> |
[media] tvp5150: add support for asynchronous probing
Allow the subdevice to be probed asynchronously.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakar
[media] tvp5150: add support for asynchronous probing
Allow the subdevice to be probed asynchronously.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
Revision tags: v4.3-rc1, v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4, v4.2-rc3, v4.2-rc2 |
|
#
dfadacca |
| 10-Jul-2015 |
Krzysztof Kozlowski <k.kozlowski@samsung.com> |
[media] i2c: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver() will set it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> S
[media] i2c: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver() will set it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
Revision tags: v4.2-rc1, v4.1, v4.1-rc8, v4.1-rc7, v4.1-rc6, v4.1-rc5, v4.1-rc4, v4.1-rc3, v4.1-rc2, v4.1-rc1, v4.0 |
|
#
da298c6d |
| 09-Apr-2015 |
Hans Verkuil <hans.verkuil@cisco.com> |
[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op.
Signed-off-by: Hans
[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|