V4L/DVB: dvb: add lgdt3304 support to lgdt3305 driver

There's a currently-unused lgdt3304 demod driver, which leaves a lot to
be desired as far as functionality. The 3304 is unsurprisingly quite
similar to the 3305, and empirical testing yeilds far better results
and more complete functionality by merging 3304 support into the 3305
driver. (For example, the current lgdt3304 driver lacks support for
signal strength, snr, ucblocks, etc., which we get w/the lgdt3305).

For the moment, not dropping the lgdt3304 driver, and its still up to
a given device's config setup to choose which demod driver to use, but
I'd suggest dropping the 3304 driver entirely.

As a follow-up to this patch, I've got another patch that adds support
for the KWorld PlusTV 340U (ATSC) em2870-based tuner stick, driving
its lgdt3304 demod via this lgdt3305 driver, which is what I used to
successfully test this patch with both VSB_8 and QAM_256 signals.

A few pieces are still a touch crude, but I think its a solid start,
as well as much cleaner and more feature-complete than the existing
lgdt3304 driver.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/frontends/lgdt3305.h b/drivers/media/dvb/frontends/lgdt3305.h
index 9cb11c9..a7f30c2 100644
--- a/drivers/media/dvb/frontends/lgdt3305.h
+++ b/drivers/media/dvb/frontends/lgdt3305.h
@@ -41,6 +41,11 @@
 	LGDT3305_TP_VALID_HIGH = 1,
 };
 
+enum lgdt_demod_chip_type {
+	LGDT3305 = 0,
+	LGDT3304 = 1,
+};
+
 struct lgdt3305_config {
 	u8 i2c_addr;
 
@@ -65,6 +70,7 @@
 	enum lgdt3305_mpeg_mode mpeg_mode;
 	enum lgdt3305_tp_clock_edge tpclk_edge;
 	enum lgdt3305_tp_valid_polarity tpvalid_polarity;
+	enum lgdt_demod_chip_type demod_chip;
 };
 
 #if defined(CONFIG_DVB_LGDT3305) || (defined(CONFIG_DVB_LGDT3305_MODULE) && \