All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: linux-media@vger.kernel.org
Cc: Antti Palosaari <crope@iki.fi>, Malcolm Priestley <tvboxspy@gmail.com>
Subject: [REVIEW PATCH 03/41] af9035: add support for 1st gen it9135
Date: Sun, 10 Mar 2013 04:02:55 +0200	[thread overview]
Message-ID: <1362881013-5271-3-git-send-email-crope@iki.fi> (raw)
In-Reply-To: <1362881013-5271-1-git-send-email-crope@iki.fi>

Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/usb/dvb-usb-v2/Kconfig  |  1 +
 drivers/media/usb/dvb-usb-v2/af9035.c | 24 +++++++++++++++++++++++-
 drivers/media/usb/dvb-usb-v2/af9035.h |  1 +
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig
index 692224d..2d4abfa 100644
--- a/drivers/media/usb/dvb-usb-v2/Kconfig
+++ b/drivers/media/usb/dvb-usb-v2/Kconfig
@@ -41,6 +41,7 @@ config DVB_USB_AF9035
 	select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_FC2580 if MEDIA_SUBDRV_AUTOSELECT
+	select MEDIA_TUNER_IT913X if MEDIA_SUBDRV_AUTOSELECT
 	help
 	  Say Y here to support the Afatech AF9035 based DVB USB receiver.
 
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index f11cc42..d57fbb1 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -652,6 +652,10 @@ static int af9035_read_config_it9135(struct dvb_usb_device *d)
 	int ret, i;
 	u8 tmp;
 
+	/* demod I2C "address" */
+	state->af9033_config[0].i2c_addr = 0x38;
+	state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38;
+	state->af9033_config[0].adc_multiplier = AF9033_ADC_MULTIPLIER_2X;
 	state->dual_mode = false;
 
 	/* get demod clock */
@@ -920,6 +924,20 @@ static const struct fc0012_config af9035_fc0012_config[] = {
 	}
 };
 
+static struct ite_config af9035_it913x_config = {
+	.chip_ver = 0x01,
+	.chip_type = 0x9135,
+	.firmware = 0x00000000,
+	.firmware_ver = 1,
+	.adc_x2 = 1,
+	.tuner_id_0 = AF9033_TUNER_IT9135_38,
+	.tuner_id_1 = 0x00,
+	.dual_mode = 0x00,
+	.adf = 0x00,
+	/* option to read SIGNAL_LEVEL */
+	.read_slevel = 0,
+};
+
 static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
 {
 	struct state *state = adap_to_priv(adap);
@@ -1082,6 +1100,11 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
 		fe = dvb_attach(fc0012_attach, adap->fe[0], &d->i2c_adap,
 				&af9035_fc0012_config[adap->id]);
 		break;
+	case AF9033_TUNER_IT9135_38:
+		/* attach tuner */
+		fe = dvb_attach(it913x_attach, adap->fe[0],
+				&d->i2c_adap, 0x38, &af9035_it913x_config);
+		break;
 	default:
 		fe = NULL;
 	}
@@ -1275,7 +1298,6 @@ static const struct dvb_usb_device_properties it9135_props = {
 	.frontend_attach = af9035_frontend_attach,
 	.tuner_attach = af9035_tuner_attach,
 	.init = af9035_init,
-	.get_rc_config = af9035_get_rc_config,
 
 	.num_adapters = 1,
 	.adapter = {
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
index 29f3eec..9556bab 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -30,6 +30,7 @@
 #include "mxl5007t.h"
 #include "tda18218.h"
 #include "fc2580.h"
+#include "it913x.h"
 
 struct reg_val {
 	u32 reg;
-- 
1.7.11.7


  parent reply	other threads:[~2013-03-10  2:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10  2:02 [REVIEW PATCH 01/41] ITE IT913X silicon tuner driver Antti Palosaari
2013-03-10  2:02 ` [REVIEW PATCH 02/41] af9033: support for it913x tuners Antti Palosaari
2013-03-10  2:02 ` Antti Palosaari [this message]
2013-03-10  2:02 ` [REVIEW PATCH 04/41] af9035: add auto configuration heuristic for it9135 Antti Palosaari
2013-03-10  2:02 ` [REVIEW PATCH 05/41] af9035: fix af9033 demod sampling frequency Antti Palosaari
2013-03-10  2:02 ` [REVIEW PATCH 06/41] af9015: reject device TerraTec Cinergy T Stick Dual RC (rev. 2) Antti Palosaari
2013-03-10  2:02 ` [REVIEW PATCH 07/41] af9035: [0ccd:0099] " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 08/41] af9035: constify clock tables Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 09/41] af9035: USB1.1 support (== PID filters) Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 10/41] af9035: merge af9035 and it9135 eeprom read routines Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 11/41] af9035: basic support for IT9135 v2 chips Antti Palosaari
2013-03-21 21:54   ` Mauro Carvalho Chehab
2013-03-21 23:45     ` Antti Palosaari
2013-03-22  9:30       ` Mauro Carvalho Chehab
2013-03-22 10:45         ` Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 12/41] af9033: IT9135 v2 supported related changes Antti Palosaari
2013-03-10  2:03 ` =?y?q?=5BREVIEW=20PATCH=2013/41=5D=20af9035=3A=20IT9135=20dual=20tuner=20related=20changes?= Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 14/41] it913x: merge it913x_fe_start() to it913x_init_tuner() Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 15/41] it913x: merge it913x_fe_suspend() to it913x_fe_sleep() Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 16/41] it913x: rename functions and variables Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 17/41] it913x: tuner power up routines Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 18/41] it913x: get rid of it913x config struct Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 19/41] it913x: remove unused variables Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 20/41] it913x: include tuner IDs from af9033.h Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 21/41] it913x: use dev_foo() logging Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 22/41] af9033: add IT9135 demod reg init tables Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 23/41] it913x: remove demod init reg tables Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 24/41] af9035: select firmware loader according to firmware Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 25/41] af9035: use already detected eeprom base addr Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 26/41] af9035: set demod TS mode config in read_config() Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 27/41] af9035: enable remote controller for IT9135 too Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 28/41] af9035: change dual mode boolean to bit field Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 29/41] af9033: add IT9135 tuner config "38" init table Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 30/41] af9033: add IT9135 tuner config "51" " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 31/41] af9033: add IT9135 tuner config "52" " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 32/41] af9033: add IT9135 tuner config "60" " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 33/41] af9033: add IT9135 tuner config "61" " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 34/41] af9033: add IT9135 tuner config "62" " Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 35/41] it913x: remove unused af9033 demod tuner config inits Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 36/41] af9033: move code from it913x to af9033 Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 37/41] af9033: sleep on attach() Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 38/41] af9033: implement i/o optimized reg table writer Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 39/41] af9035: check I/O errors on IR polling Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 40/41] af9035: style changes for remote controller polling Antti Palosaari
2013-03-10  2:03 ` [REVIEW PATCH 41/41] MAINTAINERS: add drivers/media/tuners/it913x* Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362881013-5271-3-git-send-email-crope@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=tvboxspy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.