aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/it913x.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>