summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/Kconfig8
-rw-r--r--linux/drivers/media/dvb/frontends/Makefile2
-rw-r--r--linux/drivers/media/dvb/frontends/lgdt3304.c (renamed from linux/drivers/media/video/empia/lgdt3304/lgdt3304.c)44
-rw-r--r--linux/drivers/media/dvb/frontends/lgdt3304.h (renamed from linux/drivers/media/video/empia/lgdt3304/lgdt3304.h)0
-rw-r--r--linux/drivers/media/video/empia/lgdt3304/Makefile7
5 files changed, 32 insertions, 29 deletions
diff --git a/linux/drivers/media/dvb/frontends/Kconfig b/linux/drivers/media/dvb/frontends/Kconfig
index 8da1e8166..69eb1f8eb 100644
--- a/linux/drivers/media/dvb/frontends/Kconfig
+++ b/linux/drivers/media/dvb/frontends/Kconfig
@@ -345,6 +345,14 @@ config DVB_LGDT330X
An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
to support this frontend.
+config DVB_LGDT3304
+ tristate "LG Electronics LGDT3304"
+ depends on DVB_CORE && I2C
+ default m if DVB_FE_CUSTOMISE
+ help
+ An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
+ to support this frontend.
+
config DVB_S5H1409
tristate "Samsung S5H1409 based"
depends on DVB_CORE && I2C
diff --git a/linux/drivers/media/dvb/frontends/Makefile b/linux/drivers/media/dvb/frontends/Makefile
index 11a5407ec..651c9e889 100644
--- a/linux/drivers/media/dvb/frontends/Makefile
+++ b/linux/drivers/media/dvb/frontends/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_DVB_OR51132) += or51132.o
obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
obj-$(CONFIG_DVB_S5H1420) += s5h1420.o
obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o
+obj-$(CONFIG_DVB_LGDT3304) += lgdt3304.o
obj-$(CONFIG_DVB_CX24123) += cx24123.o
obj-$(CONFIG_DVB_LNBP21) += lnbp21.o
obj-$(CONFIG_DVB_ISL6405) += isl6405.o
@@ -58,3 +59,4 @@ obj-$(CONFIG_DVB_SI21XX) += si21xx.o
obj-$(CONFIG_DVB_STV0288) += stv0288.o
obj-$(CONFIG_DVB_STB6000) += stb6000.o
obj-$(CONFIG_DVB_S921) += s921.o
+
diff --git a/linux/drivers/media/video/empia/lgdt3304/lgdt3304.c b/linux/drivers/media/dvb/frontends/lgdt3304.c
index 1e8867b15..724811744 100644
--- a/linux/drivers/media/video/empia/lgdt3304/lgdt3304.c
+++ b/linux/drivers/media/dvb/frontends/lgdt3304.c
@@ -20,10 +20,10 @@ MODULE_PARM_DESC(debug,"lgdt3304 debugging (default off)");
struct lgdt3304_state
{
- struct dvb_frontend frontend;
- fe_modulation_t current_modulation;
- __u32 snr;
- __u32 current_frequency;
+ struct dvb_frontend frontend;
+ fe_modulation_t current_modulation;
+ __u32 snr;
+ __u32 current_frequency;
__u8 addr;
struct i2c_adapter *i2c;
};
@@ -37,20 +37,20 @@ static int i2c_write_demod_bytes (struct dvb_frontend *fe, __u8 *buf, int len)
.len = 3,
.buf = buf
};
- int i;
- int err;
+ int i;
+ int err;
- for (i=0; i<len-1; i+=3){
+ for (i=0; i<len-1; i+=3){
if((err = i2c_transfer(state->i2c, &i2cmsgs, 1))<0) {
printk("%s i2c_transfer error %d\n", __FUNCTION__, err);
- if (err < 0)
- return err;
- else
- return -EREMOTEIO;
- }
- i2cmsgs.buf += 3;
- }
- return 0;
+ if (err < 0)
+ return err;
+ else
+ return -EREMOTEIO;
+ }
+ i2cmsgs.buf += 3;
+ }
+ return 0;
}
static int lgdt3304_i2c_read_reg(struct dvb_frontend *fe, unsigned int reg)
@@ -102,7 +102,7 @@ static int lgdt3304_i2c_write_reg(struct dvb_frontend *fe, int reg, int val)
}
-static int lgdt3304_soft_Reset(struct dvb_frontend *fe)
+static int lgdt3304_soft_Reset(struct dvb_frontend *fe)
{
lgdt3304_i2c_write_reg(fe, 0x0002, 0x9a);
lgdt3304_i2c_write_reg(fe, 0x0002, 0x9b);
@@ -138,7 +138,7 @@ static int lgdt3304_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_
0x03, 0x14, 0xe1,
0x05, 0x0e, 0x5b,
};
-
+
/* not yet tested .. */
static __u8 lgdt3304_qam64_data[] = {
/* 16bit , 8bit */
@@ -268,14 +268,14 @@ static int lgdt3304_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_
lgdt3304_soft_Reset(fe);
- if (fe->ops.tuner_ops.set_params)
- fe->ops.tuner_ops.set_params(fe, param);
-
+ if (fe->ops.tuner_ops.set_params)
+ fe->ops.tuner_ops.set_params(fe, param);
+
return 0;
}
static int lgdt3304_init(struct dvb_frontend *fe) {
- return 0;
+ return 0;
}
static int lgdt3304_sleep(struct dvb_frontend *fe) {
@@ -291,7 +291,7 @@ static int lgdt3304_read_status(struct dvb_frontend *fe, fe_status_t *status)
*status = 0;
dprintk("lgdt read status\n");
-
+
r011d = lgdt3304_i2c_read_reg(fe, 0x011d);
dprintk("%02x\n", r011d);
diff --git a/linux/drivers/media/video/empia/lgdt3304/lgdt3304.h b/linux/drivers/media/dvb/frontends/lgdt3304.h
index fc409fe59..fc409fe59 100644
--- a/linux/drivers/media/video/empia/lgdt3304/lgdt3304.h
+++ b/linux/drivers/media/dvb/frontends/lgdt3304.h
diff --git a/linux/drivers/media/video/empia/lgdt3304/Makefile b/linux/drivers/media/video/empia/lgdt3304/Makefile
deleted file mode 100644
index 4d261a762..000000000
--- a/linux/drivers/media/video/empia/lgdt3304/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-lgdt3304-demod-objs := lgdt3304.o
-
-obj-m += lgdt3304-demod.o
-
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
-EXTRA_CFLAGS += -DCONFIG_DVB_LGDT3304