aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/it913x.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-27media: tuners/it913x.c: fix missing error codeHans Verkuil1-0/+1
Fixes this smatch warning: drivers/media/tuners/it913x.c:65 it913x_init() warn: missing error code 'ret' Set ret to -EINVAL if the clock identifier was invalid. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-11/+1
Based on 3 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02media: dvb: convert tuner_info frequencies to HzMauro Carvalho Chehab1-3/+3
Right now, satellite tuner drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal tuners capable of handling both satellite and non-satelite delivery systems are appearing. We end by needing to hack the drivers in order to support such hybrid tuners. So, convert everything to specify tuner frequencies in Hz. Plese notice that a similar patch is also needed for frontends. Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Acked-by: Michael Büsch <m@bues.ch> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2017-01-31[media] it913x: add chip device ids for bindingAntti Palosaari1-1/+10
Driver supports 2 different device versions, AX and BX. Use device IDs to pass chip version information to driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] it913x: change driver model from i2c to platformAntti Palosaari1-53/+36
That tuner is integrated to demodulator and communicates via demodulators address space. We cannot register both demodulator and tuner having same address to same I2C bus, so better to change it platform driver in order to implement I2C adapter correctly. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-27[media] media: Drop FSF's postal address from the source code filesSakari Ailus1-4/+0
Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2016-07-08[media] it913x: do not allow driver unbindAntti Palosaari1-0/+1
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2015-08-11[media] tuners: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
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>
2014-09-21[media] it913x: replace udelay polling with jiffiesAntti Palosaari1-9/+20
udelay based I/O polling loop is a bad idea, especially system performance point of view. Kernel jiffies are preferred solution for such situations. Use it instead. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: refactor code largelyAntti Palosaari1-162/+194
Refactor code largely. Try to keep order of register read/write same as windows driver does as it makes comparing sniffs easier. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: get rid of script loader and and private header fileAntti Palosaari1-32/+31
Used script loader is quite useless and hides register numbers making code hard to understand. Get rid of it and use standard RegMap register write functions directly. it913x_priv.h file leaves empty after that change and is also removed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: remove dead codeAntti Palosaari1-8/+1
Remove unused tuner set template. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: re-implement sleepAntti Palosaari1-16/+60
Re-implement sleep. Based USB sniffs taken from the latest Hauppauge windows driver version 07/10/2014, 14.6.23.32191. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: convert to RegMap APIAntti Palosaari1-105/+32
Use RegMap API to cover I2C register access routines. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: rename 'state' to 'dev'Antti Palosaari1-75/+75
foo_dev seems to be most correct term for the structure holding data of each device instance. It is most used term in Kernel and also examples from book Linux Device Drivers, Third Edition, uses it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: change reg read/write routines more commonAntti Palosaari1-31/+27
Change register write and read routines to similar which are typically used. We have to add processor core as a part of register address in order to simplify register access. Chip has two cores, called link and ofdm. As for now, use address bit 24 to address used core. Bits 15:0 are register address in given core. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: convert to I2C driverAntti Palosaari1-60/+73
Change the it913x driver to use the I2C high lever tuner binding model. As af9035 depends on it, add a code there to do the binding. [mchehab@osg.samsung.com: Merge 3 patches into one, because we don't want to break bisect due to the conversion] Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] it913x: rename tuner_it913x => it913xAntti Palosaari1-0/+463
Remove tuner_ prefix from module name and file names. Prefix was added due to file name conflict on media out-tree build system. Demodulator having same name does not exists anymore. So lets remove dumb prefix. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2013-04-16[media] it913x: rename its tuner driver to tuner_it913xMauro Carvalho Chehab1-447/+0
There are three drivers with *it913x name on it, and they all belong to the same device: a tuner, at it913x.c; a frontend: it913x-fe.c; a bridge: it913x.c, renamed to dvb_usb_it913x by the building system. This is confusing. Even more confusing are the two .c files with the same name under different directories, with different contents and different functions. So, prepend the tuner one. This also breaks the out-of-tree compilation system. Reported-by: Frederic Fays <frederic.fays@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: move code from it913x to af9033Antti Palosaari1-6/+0
That register is property of demodulator so move it correct place. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: remove unused af9033 demod tuner config initsAntti Palosaari1-30/+0
Those are demodulator init tables according to used tuner tuner config. af9033 demod driver does those inits currently and due to that these duplicate inits could be removed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: remove demod init reg tablesAntti Palosaari1-8/+0
These are demod inits and are already done by af9033 demod driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: use dev_foo() loggingAntti Palosaari1-5/+11
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: include tuner IDs from af9033.hAntti Palosaari1-12/+12
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: remove unused variablesAntti Palosaari1-12/+2
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: get rid of it913x config structAntti Palosaari1-15/+23
We don't need it. Tuner ID and device address are enough. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: tuner power up routinesAntti Palosaari1-4/+8
Copy forgotten power up registers from it913x-fe driver. Remove two demod registers as those are already written by af9033 driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: rename functions and variablesAntti Palosaari1-34/+38
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: merge it913x_fe_suspend() to it913x_fe_sleep()Antti Palosaari1-31/+1
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: merge it913x_fe_start() to it913x_init_tuner()Antti Palosaari1-120/+45
Merge those functions to one and disable sleep. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] ITE IT913X silicon tuner driverAntti Palosaari1-0/+584
It is tuner driver for tuner integrated to the ITE IT9135 and IT9137 chips. I split it out from the current it913x-fe driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>