V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module

Add analog tuning support to tda827x dvb_frontend tuner module.

Convert tda8290 module back to native tuner interface.

The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface.  tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 1311273..99558c7 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -220,15 +220,6 @@
 	tuner_warn("====================== WARNING! ======================\n");
 }
 
-static void attach_tda8290(struct tuner *t)
-{
-	struct tda8290_config cfg = {
-		.lna_cfg        = &t->config,
-		.tuner_callback = t->tuner_callback
-	};
-	tda8290_attach(&t->fe, t->i2c.adapter, t->i2c.addr, &cfg);
-}
-
 static void attach_simple_tuner(struct tuner *t)
 {
 	struct simple_tuner_config cfg = {
@@ -284,7 +275,7 @@
 		break;
 	case TUNER_PHILIPS_TDA8290:
 	{
-		attach_tda8290(t);
+		tda8290_attach(t);
 		break;
 	}
 	case TUNER_TEA5767:
@@ -343,7 +334,8 @@
 		break;
 	}
 
-	if (fe_tuner_ops->set_analog_params) {
+	if ((fe_tuner_ops->set_analog_params) &&
+	    ((NULL == t->ops.set_tv_freq) && (NULL == t->ops.set_radio_freq))) {
 		strlcpy(t->i2c.name, fe_tuner_ops->info.name, sizeof(t->i2c.name));
 
 		t->ops.set_tv_freq    = fe_set_freq;
@@ -624,7 +616,7 @@
 		case 0x4b:
 			/* If chip is not tda8290, don't register.
 			   since it can be tda9887*/
-			if (tda8290_probe(t->i2c.adapter, t->i2c.addr) == 0) {
+			if (tda8290_probe(t) == 0) {
 				tuner_dbg("chip at addr %x is a tda8290\n", addr);
 			} else {
 				/* Default is being tda9887 */