summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-05-05media: ngene: fix ci_tsfix modparam description typoDaniel Scheller1-1/+1
s/shifs/shifts/ Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: ngene: cleanup superfluous I2C adapter evaluationDaniel Scheller1-13/+0
Commit ee93340e98bc ("media: ngene: deduplicate I2C adapter evaluation") added a helper to evaluate the I2C adapter to be used for demod/tuner attachment based on the given ngene_channel, and that helper is used in many attach functions to initialise the i2c_adapter variable. However, for some reason in tuner_attach_stv6110() and demod_attach_stv0900(), the adapter evaluation wasn't removed as in all other functions. Fix (or finalize, even) the helper use by cleaning up the superfluous I2C adapter evaluation leftover in these two functions. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: pt1: use #ifdef CONFIG_PM_SLEEP instead of #ifMauro Carvalho Chehab1-1/+1
As pointed by ktest: >> drivers/media//pci/pt1/pt1.c:1433:5: warning: "CONFIG_PM_SLEEP" is not defined, evaluates to 0 [-Wundef] #if CONFIG_PM_SLEEP ^~~~~~~~~~~~~~~ Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: include/media: fix missing | operator when setting cfgColin Ian King1-1/+1
The value from a readl is being masked with ITE_REG_CIOCAN_MASK however this is not being used and cfg is being re-assigned. I believe the assignment operator should actually be instead the |= operator. Detected by CoverityScan, CID#1467987 ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: remove a now unused varMauro Carvalho Chehab1-1/+0
drivers/media/usb/cx231xx/cx231xx-dvb.c: In function 'unregister_dvb': drivers/media/usb/cx231xx/cx231xx-dvb.c:607:21: warning: unused variable 'client' [-Wunused-variable] struct i2c_client *client; ^~~~~~ Fixes: a12481354656 ("media: cx231xx: Switch to using new dvb i2c helpers") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Add I2C_MUX dependencyBrad Love1-1/+1
cx231xx requires i2c mux adapter capability. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Remove RC_CORE dependencyBrad Love1-1/+0
VIDEO_CX231XX_RC requires RC_CORE, but VIDEO_CX231XX does not require RC to compile or function. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Remove unnecessary parameter clearBrad Love1-1/+0
The default is now 0, no need to override Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Update 955Q from dvb attach to i2c deviceBrad Love1-10/+11
Trim out some unused config params. Use the i2c mux adapter returned by frontend with the tuner. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Switch to using new dvb i2c helpersBrad Love1-252/+78
Mostly very straight forward replace of blocks with equivalent code. Cleanup added at end of dvb_init in case of failure. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Ignore an i2c mux adapterBrad Love1-1/+1
Hauppauge 935C cannot communicate with the si2157 when using the mux adapter returned by the si2168, so disable it to fix the device. Signed-off-by: Brad Love <brad@nextdimension.cc> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Style fix for struct zero initBrad Love1-8/+4
Replace zero fill memset inits with equivalent {} in declaration Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Use board profile values for addressesBrad Love1-10/+9
Replace all usage of hard coded values with the proper field from the board profile. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: cx231xx: Fix several incorrect demod addressesBrad Love1-3/+3
Now the board values match the hard coded constants used in the dvb initialization. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-usb: Replace GFP_ATOMIC with GFP_KERNELJia-Ju Bai1-3/+3
Despite never getting called from atomic context, usb URB memory allocations use GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. [mchehab+samsung@kernel.org: merged 3 similar patches into one] Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: pt1: fix strncmp() size warningMauro Carvalho Chehab1-1/+2
As warned by smatch: drivers/media/pci/pt1/pt1.c:213 config_demod() error: strncmp() '"tc90522sat"' too small (11 vs 20) Use the same strncmp() syntax as pt1_init_frontends() does. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb: earth-pt1: replace schedule_timeout with usleep_rangeAkihiro Tsukada1-11/+23
As described in Document/timers/timers-howto.txt, hrtimer-based delay should be used for small sleeps. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb: earth-pt1: add support for suspend/resumeAkihiro Tsukada1-2/+105
Without this patch, re-loading of the module was required after resume. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb: earth-pt1: decompose pt1 driver into sub driversAkihiro Tsukada7-1456/+227
earth-pt1 was a monolithic module and included demod/tuner drivers. This patch removes those FE parts and attach demod/tuner i2c drivers. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: tuners: add new i2c driver for Sharp qm1d1b0004 ISDB-S tunerAkihiro Tsukada4-0/+296
The tuner is used in Earthsoft PT1/PT2 DVB boards, and the driver was extraced from (the former) va1j5jf8007s.c of PT1. it might contain PT1 specific configs. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-frontends/dvb-pll: add tda6651 ISDB-T pll_descAkihiro Tsukada2-0/+25
This patch adds a PLL "description" of Philips TDA6651 for ISDB-T. It was extracted from (the former) va1j5jf8007t.c of EarthSoft PT1, thus the desc might include PT1 specific configs. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-usb-v2/gl861: ensure USB message buffers DMA'ableAkihiro Tsukada1-3/+17
i2c message buf might be on stack. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-usb-v2/gl861: use usleep_range() for short delayAkihiro Tsukada1-1/+1
As the kernel doc "timers-howto.txt" reads, short delay with msleep() can take much longer. In a case of raspbery-pi platform where CONFIG_HZ_100 was set, it actually affected the init of Friio devices since it issues lots of i2c transactions with short delay. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-frontends/dvb-pll: add tua6034 ISDB-T tuner used in FriioAkihiro Tsukada2-0/+20
This driver already contains tua6034-based device settings, but they are not for ISDB-T and have different parameters. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05media: dvb-frontends/dvb-pll: add i2c driver supportAkihiro Tsukada2-0/+71
registers the module as an i2c driver, but keeps dvb_pll_attach() untouched for compatibility. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: v4l2-dev: use pr_foo() for printing messagesMauro Carvalho Chehab1-19/+26
Instead of using printk() directly, use the pr_foo() macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: platform: video-mux: propagate format from sink to sourceChris Lesiak1-1/+15
Propagate the v4l2_mbus_framefmt to the source pad when either a sink pad is activated or when the format of the active sink pad changes. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: i2c: tvp5150: Fix open brace placement codding styleNasser Afshin1-2/+2
This patch resolves the following checkpatch.pl error: ERROR: that open brace { should be on the previous line Signed-off-by: Nasser Afshin <Afshin.Nasser@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: i2c: tvp5150: Use the correct comment styleNasser Afshin1-7/+12
This patch resolves checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Nasser Afshin <Afshin.Nasser@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: i2c: tvp5150: Add a space after commasNasser Afshin1-67/+67
This patch resolves checkpatch.pl errors: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Nasser Afshin <Afshin.Nasser@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: i2c: tvp5150: Use parentheses for sizeofNasser Afshin1-1/+1
This patch resolves a checkpatch.pl warning: WARNING: sizeof *cap should be sizeof(*cap) Signed-off-by: Nasser Afshin <Afshin.Nasser@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: bttv: Fixed oops error when capturing at yuv410pSamuel Williams1-8/+9
When capturing at yuv410p, sg_next was called too many times when chroma is false, eventually returning NULL. This patch does fix this for my hardware. Signed-off-by: Samuel Williams <sam8641@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: tuners/qm1d1c0042: use SPDX License IdentifierAkihiro Tsukada2-20/+2
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: tuners/mxl301rf: use SPDX License IdentifierAkihiro Tsukada2-20/+2
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: dvb/pci/pt3: use SPDX License IdentifierAkihiro Tsukada4-40/+4
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: dvb-frontends/tc90522: use SPDX License IdentifierAkihiro Tsukada2-20/+2
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: dvb-core/dvb_frontend: set better default for ISDB-TAkihiro Tsukada1-1/+1
DTV_ISDBT_LAYER_ENABLED parameter should be set to "All" by default, instead of "None", as described in the API document. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: dvb-frontends/tc90522: fix bit shift mistakesAkihiro Tsukada1-2/+2
GIT_AUTHOR_NAME=Akihiro TSUKADA GIT_AUTHOR_EMAIL=tskd08@gmail.com they were obviously wrong. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: ov13858: Remove owner assignment from i2c_driverFabio Estevam1-1/+0
Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: ov5695: Remove owner assignment from i2c_driverFabio Estevam1-1/+0
Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Cc: Shunqian Zheng <zhengsq@rock-chips.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: em28xx-cards: output regular messages as infoChris Mayo1-6/+6
Messages expected during device probe were being marked as errors. Signed-off-by: Chris Mayo <aklhfex@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: pt3: no need to check if null for dvb_module_release()Mauro Carvalho Chehab1-4/+2
Such check is already there at the routine. So, no need to repeat it outside. Cc: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: media/dvb: earth-pt3: use the new i2c binding helperAkihiro Tsukada1-37/+22
This patch slightly simplifies the binding code by introducing commit 8f569c0b4e6b ("media: dvb-core: add helper functions for I2C binding"). Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: dvb: add alternative USB PID for Hauppauge WinTV-soloHDRainer Keller2-0/+3
Newer DVB receivers of this type have a different USB PID. Signed-off-by: Rainer Keller <mail@rainerkeller.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: ddbridge, cxd2099: include guard, fix unneeded NULL init, stringsDaniel Scheller5-5/+9
Three really tiny minors in this single commit which all on their own would just clutter up the commit history unnecessarily: * ddbridge-regs.h is lacking an include guard. Add it. * Fix an unnecessary NULL initialisation in ddbridge-ci. The declaration of the ci struct ptr is immediately followed by kzalloc(). * Clarify that the CXD2099AR is a Sony device in the cxd2099 driver at a few places including Kconfig. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Acked-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: cxd2880-spi: avoid out-of-bounds access warningArnd Bergmann1-17/+7
The -Warray-bounds warning in gcc-8 triggers for a newly added file: drivers/media/spi/cxd2880-spi.c: In function 'cxd2880_write_reg': drivers/media/spi/cxd2880-spi.c:111:3: error: 'memcpy' forming offset [133, 258] is out of the bounds [0, 132] of object 'send_data' with type 'u8[132]' {aka 'unsigned char[132]'} [-Werror=array-bounds] The problem appears to be that we have two range checks in this function, first comparing against BURST_WRITE_MAX (128) and then comparing against a literal '255'. The logic checking the buffer size looks at the second one and decides that this might be the actual maximum data length. This is understandable behavior from the compiler, but the code is actually safe. Since the first check is already shorter, we can remove the loop and only leave that. To be on the safe side in case BURST_WRITE_MAX might be increased, I'm leaving the check against U8_MAX. Fixes: bd24fcddf6b8 ("media: cxd2880-spi: Add support for CXD2880 SPI interface") Cc: Martin Sebor <msebor@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: lgdt330x: don't use an uninitialized stateMauro Carvalho Chehab1-1/+2
If state is not initialized or is freed, we can't use it: drivers/media/dvb-frontends/lgdt330x.c:920 lgdt330x_probe() error: potential null dereference 'state'. (kzalloc returns null) drivers/media/dvb-frontends/lgdt330x.c:920 lgdt330x_probe() error: we previously assumed 'state' could be null (see line 878) drivers/media/dvb-frontends/lgdt330x.c:920 lgdt330x_probe() error: dereferencing freed memory 'state' Fixes: 23ba635d45f5 ("media: lgdt330x: convert it to the new I2C binding way") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: lgdt330x: add block error counts via DVBv5Mauro Carvalho Chehab1-24/+76
Show the UCB error counts via DVBv5. Please notice that there's no scale indication at the driver. As we don't have the datasheet, let's assume that it is receiving data at a rate of 10.000 packets per second. Ideally, this should be read or estimated. In order to avoid flooding I2C bus with data, the maximum polling rate for those stats was set to 1 second. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: lgdt330x: get rid of read_ber stubMauro Carvalho Chehab1-8/+0
This routine does nothing. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: lgdt330x: provide DVBv5 Carrier S/N measurementsMauro Carvalho Chehab1-7/+40
Change the logic at the driver to provide CNR stats via DVBv5 API. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>