diff options
author | Michael Krufky <mkrufky@m1k.net> | 2005-07-27 14:46:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:17 -0400 |
commit | 6ddcc9197beef7cba993c38cdcad45aefb557d33 (patch) | |
tree | 85c5f8a20c4c14e2ce6f8ad5b4e17b0f1500e22c /drivers/media/dvb/frontends | |
parent | 9d2599d98e9cb511f326b2d1b353e462bc360774 (diff) |
[PATCH] dvb: rename lgdt3302 frontend module to lgdt330x
Rename lgdt3302 to lgdt330x, to make way for the addition of lgdt3303
support in future revisions.
I am changing the name of this module now so that hopefully the name will
be changed before the release of 2.6.13 ... It wouldn't make sense to
release 2.6.13 with the name lgdt3302 in it, which will only be renamed to
lgdt330x in later versions.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/Kconfig | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.c (renamed from drivers/media/dvb/frontends/lgdt3302.c) | 123 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.h (renamed from drivers/media/dvb/frontends/lgdt3302.h) | 12 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x_priv.h (renamed from drivers/media/dvb/frontends/lgdt3302_priv.h) | 10 |
5 files changed, 74 insertions, 77 deletions
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index d847c62bd837..e83256d0fd14 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -187,8 +187,8 @@ config DVB_BCM3510 | |||
187 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to | 187 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to |
188 | support this frontend. | 188 | support this frontend. |
189 | 189 | ||
190 | config DVB_LGDT3302 | 190 | config DVB_LGDT330X |
191 | tristate "LGDT3302 based (DViCO FusionHDTV3 Gold)" | 191 | tristate "LGDT3302 or LGDT3303 based (DViCO FusionHDTV Gold)" |
192 | depends on DVB_CORE | 192 | depends on DVB_CORE |
193 | help | 193 | help |
194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index de5e240cba7f..ad8658ffd60a 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile | |||
@@ -30,4 +30,4 @@ obj-$(CONFIG_DVB_OR51211) += or51211.o | |||
30 | obj-$(CONFIG_DVB_OR51132) += or51132.o | 30 | obj-$(CONFIG_DVB_OR51132) += or51132.o |
31 | obj-$(CONFIG_DVB_BCM3510) += bcm3510.o | 31 | obj-$(CONFIG_DVB_BCM3510) += bcm3510.o |
32 | obj-$(CONFIG_DVB_S5H1420) += s5h1420.o | 32 | obj-$(CONFIG_DVB_S5H1420) += s5h1420.o |
33 | obj-$(CONFIG_DVB_LGDT3302) += lgdt3302.o | 33 | obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o |
diff --git a/drivers/media/dvb/frontends/lgdt3302.c b/drivers/media/dvb/frontends/lgdt330x.c index c3b8d4e080bb..e94dee50eecd 100644 --- a/drivers/media/dvb/frontends/lgdt3302.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FusionHDTV Gold) - VSB/QAM |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
5 | * | 5 | * |
@@ -25,10 +25,11 @@ | |||
25 | /* | 25 | /* |
26 | * NOTES ABOUT THIS DRIVER | 26 | * NOTES ABOUT THIS DRIVER |
27 | * | 27 | * |
28 | * This driver supports DViCO FusionHDTV 3 Gold under Linux. | 28 | * This driver supports DViCO FusionHDTV Gold under Linux. |
29 | * | 29 | * |
30 | * TODO: | 30 | * TODO: |
31 | * BER and signal strength always return 0. | 31 | * BER and signal strength always return 0. |
32 | * Include support for LGDT3303 | ||
32 | * | 33 | * |
33 | */ | 34 | */ |
34 | 35 | ||
@@ -41,24 +42,24 @@ | |||
41 | 42 | ||
42 | #include "dvb_frontend.h" | 43 | #include "dvb_frontend.h" |
43 | #include "dvb-pll.h" | 44 | #include "dvb-pll.h" |
44 | #include "lgdt3302_priv.h" | 45 | #include "lgdt330x_priv.h" |
45 | #include "lgdt3302.h" | 46 | #include "lgdt330x.h" |
46 | 47 | ||
47 | static int debug = 0; | 48 | static int debug = 0; |
48 | module_param(debug, int, 0644); | 49 | module_param(debug, int, 0644); |
49 | MODULE_PARM_DESC(debug,"Turn on/off lgdt3302 frontend debugging (default:off)."); | 50 | MODULE_PARM_DESC(debug,"Turn on/off lgdt330x frontend debugging (default:off)."); |
50 | #define dprintk(args...) \ | 51 | #define dprintk(args...) \ |
51 | do { \ | 52 | do { \ |
52 | if (debug) printk(KERN_DEBUG "lgdt3302: " args); \ | 53 | if (debug) printk(KERN_DEBUG "lgdt330x: " args); \ |
53 | } while (0) | 54 | } while (0) |
54 | 55 | ||
55 | struct lgdt3302_state | 56 | struct lgdt330x_state |
56 | { | 57 | { |
57 | struct i2c_adapter* i2c; | 58 | struct i2c_adapter* i2c; |
58 | struct dvb_frontend_ops ops; | 59 | struct dvb_frontend_ops ops; |
59 | 60 | ||
60 | /* Configuration settings */ | 61 | /* Configuration settings */ |
61 | const struct lgdt3302_config* config; | 62 | const struct lgdt330x_config* config; |
62 | 63 | ||
63 | struct dvb_frontend frontend; | 64 | struct dvb_frontend frontend; |
64 | 65 | ||
@@ -69,7 +70,7 @@ struct lgdt3302_state | |||
69 | u32 current_frequency; | 70 | u32 current_frequency; |
70 | }; | 71 | }; |
71 | 72 | ||
72 | static int i2c_writebytes (struct lgdt3302_state* state, | 73 | static int i2c_writebytes (struct lgdt330x_state* state, |
73 | u8 addr, /* demod_address or pll_address */ | 74 | u8 addr, /* demod_address or pll_address */ |
74 | u8 *buf, /* data bytes to send */ | 75 | u8 *buf, /* data bytes to send */ |
75 | int len /* number of bytes to send */ ) | 76 | int len /* number of bytes to send */ ) |
@@ -83,7 +84,7 @@ static int i2c_writebytes (struct lgdt3302_state* state, | |||
83 | for (i=1; i<len; i++) { | 84 | for (i=1; i<len; i++) { |
84 | tmp[1] = buf[i]; | 85 | tmp[1] = buf[i]; |
85 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 86 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
86 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x <- %02x, err == %i)\n", __FUNCTION__, addr, buf[0], err); | 87 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err == %i)\n", __FUNCTION__, addr, buf[0], err); |
87 | if (err < 0) | 88 | if (err < 0) |
88 | return err; | 89 | return err; |
89 | else | 90 | else |
@@ -95,7 +96,7 @@ static int i2c_writebytes (struct lgdt3302_state* state, | |||
95 | } | 96 | } |
96 | 97 | ||
97 | #if 0 | 98 | #if 0 |
98 | static int i2c_readbytes (struct lgdt3302_state* state, | 99 | static int i2c_readbytes (struct lgdt330x_state* state, |
99 | u8 addr, /* demod_address or pll_address */ | 100 | u8 addr, /* demod_address or pll_address */ |
100 | u8 *buf, /* holds data bytes read */ | 101 | u8 *buf, /* holds data bytes read */ |
101 | int len /* number of bytes to read */ ) | 102 | int len /* number of bytes to read */ ) |
@@ -105,7 +106,7 @@ static int i2c_readbytes (struct lgdt3302_state* state, | |||
105 | int err; | 106 | int err; |
106 | 107 | ||
107 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 108 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
108 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x, err == %i)\n", __FUNCTION__, addr, err); | 109 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x, err == %i)\n", __FUNCTION__, addr, err); |
109 | return -EREMOTEIO; | 110 | return -EREMOTEIO; |
110 | } | 111 | } |
111 | return 0; | 112 | return 0; |
@@ -117,7 +118,7 @@ static int i2c_readbytes (struct lgdt3302_state* state, | |||
117 | * then reads the data returned for (len) bytes. | 118 | * then reads the data returned for (len) bytes. |
118 | */ | 119 | */ |
119 | 120 | ||
120 | static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | 121 | static u8 i2c_selectreadbytes (struct lgdt330x_state* state, |
121 | enum I2C_REG reg, u8* buf, int len) | 122 | enum I2C_REG reg, u8* buf, int len) |
122 | { | 123 | { |
123 | u8 wr [] = { reg }; | 124 | u8 wr [] = { reg }; |
@@ -130,7 +131,7 @@ static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | |||
130 | int ret; | 131 | int ret; |
131 | ret = i2c_transfer(state->i2c, msg, 2); | 132 | ret = i2c_transfer(state->i2c, msg, 2); |
132 | if (ret != 2) { | 133 | if (ret != 2) { |
133 | printk(KERN_WARNING "lgdt3302: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __FUNCTION__, state->config->demod_address, reg, ret); | 134 | printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __FUNCTION__, state->config->demod_address, reg, ret); |
134 | } else { | 135 | } else { |
135 | ret = 0; | 136 | ret = 0; |
136 | } | 137 | } |
@@ -138,7 +139,7 @@ static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | |||
138 | } | 139 | } |
139 | 140 | ||
140 | /* Software reset */ | 141 | /* Software reset */ |
141 | int lgdt3302_SwReset(struct lgdt3302_state* state) | 142 | int lgdt330x_SwReset(struct lgdt330x_state* state) |
142 | { | 143 | { |
143 | u8 ret; | 144 | u8 ret; |
144 | u8 reset[] = { | 145 | u8 reset[] = { |
@@ -164,7 +165,7 @@ int lgdt3302_SwReset(struct lgdt3302_state* state) | |||
164 | return ret; | 165 | return ret; |
165 | } | 166 | } |
166 | 167 | ||
167 | static int lgdt3302_init(struct dvb_frontend* fe) | 168 | static int lgdt330x_init(struct dvb_frontend* fe) |
168 | { | 169 | { |
169 | /* Hardware reset is done using gpio[0] of cx23880x chip. | 170 | /* Hardware reset is done using gpio[0] of cx23880x chip. |
170 | * I'd like to do it here, but don't know how to find chip address. | 171 | * I'd like to do it here, but don't know how to find chip address. |
@@ -173,18 +174,18 @@ static int lgdt3302_init(struct dvb_frontend* fe) | |||
173 | * the caller of this function needs to do it. */ | 174 | * the caller of this function needs to do it. */ |
174 | 175 | ||
175 | dprintk("%s entered\n", __FUNCTION__); | 176 | dprintk("%s entered\n", __FUNCTION__); |
176 | return lgdt3302_SwReset((struct lgdt3302_state*) fe->demodulator_priv); | 177 | return lgdt330x_SwReset((struct lgdt330x_state*) fe->demodulator_priv); |
177 | } | 178 | } |
178 | 179 | ||
179 | static int lgdt3302_read_ber(struct dvb_frontend* fe, u32* ber) | 180 | static int lgdt330x_read_ber(struct dvb_frontend* fe, u32* ber) |
180 | { | 181 | { |
181 | *ber = 0; /* Dummy out for now */ | 182 | *ber = 0; /* Dummy out for now */ |
182 | return 0; | 183 | return 0; |
183 | } | 184 | } |
184 | 185 | ||
185 | static int lgdt3302_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 186 | static int lgdt330x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) |
186 | { | 187 | { |
187 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 188 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
188 | u8 buf[2]; | 189 | u8 buf[2]; |
189 | 190 | ||
190 | i2c_selectreadbytes(state, PACKET_ERR_COUNTER1, buf, sizeof(buf)); | 191 | i2c_selectreadbytes(state, PACKET_ERR_COUNTER1, buf, sizeof(buf)); |
@@ -193,11 +194,11 @@ static int lgdt3302_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | |||
193 | return 0; | 194 | return 0; |
194 | } | 195 | } |
195 | 196 | ||
196 | static int lgdt3302_set_parameters(struct dvb_frontend* fe, | 197 | static int lgdt330x_set_parameters(struct dvb_frontend* fe, |
197 | struct dvb_frontend_parameters *param) | 198 | struct dvb_frontend_parameters *param) |
198 | { | 199 | { |
199 | struct lgdt3302_state* state = | 200 | struct lgdt330x_state* state = |
200 | (struct lgdt3302_state*) fe->demodulator_priv; | 201 | (struct lgdt330x_state*) fe->demodulator_priv; |
201 | 202 | ||
202 | /* Use 50MHz parameter values from spec sheet since xtal is 50 */ | 203 | /* Use 50MHz parameter values from spec sheet since xtal is 50 */ |
203 | static u8 top_ctrl_cfg[] = { TOP_CONTROL, 0x03 }; | 204 | static u8 top_ctrl_cfg[] = { TOP_CONTROL, 0x03 }; |
@@ -244,7 +245,7 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
244 | state->config->pll_rf_set(fe, 0); | 245 | state->config->pll_rf_set(fe, 0); |
245 | break; | 246 | break; |
246 | default: | 247 | default: |
247 | printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); | 248 | printk(KERN_WARNING "lgdt330x: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); |
248 | return -1; | 249 | return -1; |
249 | } | 250 | } |
250 | /* Initializations common to all modes */ | 251 | /* Initializations common to all modes */ |
@@ -291,19 +292,17 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
291 | /* Change only if we are actually changing the channel */ | 292 | /* Change only if we are actually changing the channel */ |
292 | if (state->current_frequency != param->frequency) { | 293 | if (state->current_frequency != param->frequency) { |
293 | u8 buf[5]; | 294 | u8 buf[5]; |
295 | struct i2c_msg msg = { .flags = 0, .buf = &buf[1], .len = 4 }; | ||
296 | int err; | ||
294 | 297 | ||
295 | /* This must be done before the initialized msg is declared */ | ||
296 | state->config->pll_set(fe, param, buf); | 298 | state->config->pll_set(fe, param, buf); |
297 | 299 | msg.addr = buf[0]; | |
298 | struct i2c_msg msg = | ||
299 | { .addr = buf[0], .flags = 0, .buf = &buf[1], .len = 4 }; | ||
300 | int err; | ||
301 | 300 | ||
302 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x " | 301 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x " |
303 | "0x%02x 0x%02x\n", __FUNCTION__, | 302 | "0x%02x 0x%02x\n", __FUNCTION__, |
304 | buf[0],buf[1],buf[2],buf[3],buf[4]); | 303 | buf[0],buf[1],buf[2],buf[3],buf[4]); |
305 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 304 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
306 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err); | 305 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err); |
307 | if (err < 0) | 306 | if (err < 0) |
308 | return err; | 307 | return err; |
309 | else | 308 | else |
@@ -317,21 +316,21 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
317 | /* Update current frequency */ | 316 | /* Update current frequency */ |
318 | state->current_frequency = param->frequency; | 317 | state->current_frequency = param->frequency; |
319 | } | 318 | } |
320 | lgdt3302_SwReset(state); | 319 | lgdt330x_SwReset(state); |
321 | return 0; | 320 | return 0; |
322 | } | 321 | } |
323 | 322 | ||
324 | static int lgdt3302_get_frontend(struct dvb_frontend* fe, | 323 | static int lgdt330x_get_frontend(struct dvb_frontend* fe, |
325 | struct dvb_frontend_parameters* param) | 324 | struct dvb_frontend_parameters* param) |
326 | { | 325 | { |
327 | struct lgdt3302_state *state = fe->demodulator_priv; | 326 | struct lgdt330x_state *state = fe->demodulator_priv; |
328 | param->frequency = state->current_frequency; | 327 | param->frequency = state->current_frequency; |
329 | return 0; | 328 | return 0; |
330 | } | 329 | } |
331 | 330 | ||
332 | static int lgdt3302_read_status(struct dvb_frontend* fe, fe_status_t* status) | 331 | static int lgdt330x_read_status(struct dvb_frontend* fe, fe_status_t* status) |
333 | { | 332 | { |
334 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 333 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
335 | u8 buf[3]; | 334 | u8 buf[3]; |
336 | 335 | ||
337 | *status = 0; /* Reset status result */ | 336 | *status = 0; /* Reset status result */ |
@@ -391,19 +390,19 @@ static int lgdt3302_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
391 | *status |= FE_HAS_CARRIER; | 390 | *status |= FE_HAS_CARRIER; |
392 | break; | 391 | break; |
393 | default: | 392 | default: |
394 | printk("KERN_WARNING lgdt3302: %s: Modulation set to unsupported value\n", __FUNCTION__); | 393 | printk("KERN_WARNING lgdt330x: %s: Modulation set to unsupported value\n", __FUNCTION__); |
395 | } | 394 | } |
396 | 395 | ||
397 | return 0; | 396 | return 0; |
398 | } | 397 | } |
399 | 398 | ||
400 | static int lgdt3302_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 399 | static int lgdt330x_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
401 | { | 400 | { |
402 | /* not directly available. */ | 401 | /* not directly available. */ |
403 | return 0; | 402 | return 0; |
404 | } | 403 | } |
405 | 404 | ||
406 | static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | 405 | static int lgdt330x_read_snr(struct dvb_frontend* fe, u16* snr) |
407 | { | 406 | { |
408 | #ifdef SNR_IN_DB | 407 | #ifdef SNR_IN_DB |
409 | /* | 408 | /* |
@@ -458,7 +457,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
458 | static u8 buf[5];/* read data buffer */ | 457 | static u8 buf[5];/* read data buffer */ |
459 | static u32 noise; /* noise value */ | 458 | static u32 noise; /* noise value */ |
460 | static u32 snr_db; /* index into SNR_EQ[] */ | 459 | static u32 snr_db; /* index into SNR_EQ[] */ |
461 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 460 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
462 | 461 | ||
463 | /* read both equalizer and pase tracker noise data */ | 462 | /* read both equalizer and pase tracker noise data */ |
464 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); | 463 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); |
@@ -494,7 +493,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
494 | /* Return the raw noise value */ | 493 | /* Return the raw noise value */ |
495 | static u8 buf[5];/* read data buffer */ | 494 | static u8 buf[5];/* read data buffer */ |
496 | static u32 noise; /* noise value */ | 495 | static u32 noise; /* noise value */ |
497 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 496 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
498 | 497 | ||
499 | /* read both equalizer and pase tracker noise data */ | 498 | /* read both equalizer and pase tracker noise data */ |
500 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); | 499 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); |
@@ -517,7 +516,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
517 | return 0; | 516 | return 0; |
518 | } | 517 | } |
519 | 518 | ||
520 | static int lgdt3302_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) | 519 | static int lgdt330x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) |
521 | { | 520 | { |
522 | /* I have no idea about this - it may not be needed */ | 521 | /* I have no idea about this - it may not be needed */ |
523 | fe_tune_settings->min_delay_ms = 500; | 522 | fe_tune_settings->min_delay_ms = 500; |
@@ -526,22 +525,22 @@ static int lgdt3302_get_tune_settings(struct dvb_frontend* fe, struct dvb_fronte | |||
526 | return 0; | 525 | return 0; |
527 | } | 526 | } |
528 | 527 | ||
529 | static void lgdt3302_release(struct dvb_frontend* fe) | 528 | static void lgdt330x_release(struct dvb_frontend* fe) |
530 | { | 529 | { |
531 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 530 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
532 | kfree(state); | 531 | kfree(state); |
533 | } | 532 | } |
534 | 533 | ||
535 | static struct dvb_frontend_ops lgdt3302_ops; | 534 | static struct dvb_frontend_ops lgdt330x_ops; |
536 | 535 | ||
537 | struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | 536 | struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, |
538 | struct i2c_adapter* i2c) | 537 | struct i2c_adapter* i2c) |
539 | { | 538 | { |
540 | struct lgdt3302_state* state = NULL; | 539 | struct lgdt330x_state* state = NULL; |
541 | u8 buf[1]; | 540 | u8 buf[1]; |
542 | 541 | ||
543 | /* Allocate memory for the internal state */ | 542 | /* Allocate memory for the internal state */ |
544 | state = (struct lgdt3302_state*) kmalloc(sizeof(struct lgdt3302_state), GFP_KERNEL); | 543 | state = (struct lgdt330x_state*) kmalloc(sizeof(struct lgdt330x_state), GFP_KERNEL); |
545 | if (state == NULL) | 544 | if (state == NULL) |
546 | goto error; | 545 | goto error; |
547 | memset(state,0,sizeof(*state)); | 546 | memset(state,0,sizeof(*state)); |
@@ -549,7 +548,7 @@ struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | |||
549 | /* Setup the state */ | 548 | /* Setup the state */ |
550 | state->config = config; | 549 | state->config = config; |
551 | state->i2c = i2c; | 550 | state->i2c = i2c; |
552 | memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); | 551 | memcpy(&state->ops, &lgdt330x_ops, sizeof(struct dvb_frontend_ops)); |
553 | /* Verify communication with demod chip */ | 552 | /* Verify communication with demod chip */ |
554 | if (i2c_selectreadbytes(state, 2, buf, 1)) | 553 | if (i2c_selectreadbytes(state, 2, buf, 1)) |
555 | goto error; | 554 | goto error; |
@@ -569,9 +568,9 @@ error: | |||
569 | return NULL; | 568 | return NULL; |
570 | } | 569 | } |
571 | 570 | ||
572 | static struct dvb_frontend_ops lgdt3302_ops = { | 571 | static struct dvb_frontend_ops lgdt330x_ops = { |
573 | .info = { | 572 | .info = { |
574 | .name= "LG Electronics LGDT3302 VSB/QAM Frontend", | 573 | .name= "LG Electronics lgdt330x VSB/QAM Frontend", |
575 | .type = FE_ATSC, | 574 | .type = FE_ATSC, |
576 | .frequency_min= 54000000, | 575 | .frequency_min= 54000000, |
577 | .frequency_max= 858000000, | 576 | .frequency_max= 858000000, |
@@ -581,23 +580,23 @@ static struct dvb_frontend_ops lgdt3302_ops = { | |||
581 | .symbol_rate_max = 10762000, | 580 | .symbol_rate_max = 10762000, |
582 | .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB | 581 | .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB |
583 | }, | 582 | }, |
584 | .init = lgdt3302_init, | 583 | .init = lgdt330x_init, |
585 | .set_frontend = lgdt3302_set_parameters, | 584 | .set_frontend = lgdt330x_set_parameters, |
586 | .get_frontend = lgdt3302_get_frontend, | 585 | .get_frontend = lgdt330x_get_frontend, |
587 | .get_tune_settings = lgdt3302_get_tune_settings, | 586 | .get_tune_settings = lgdt330x_get_tune_settings, |
588 | .read_status = lgdt3302_read_status, | 587 | .read_status = lgdt330x_read_status, |
589 | .read_ber = lgdt3302_read_ber, | 588 | .read_ber = lgdt330x_read_ber, |
590 | .read_signal_strength = lgdt3302_read_signal_strength, | 589 | .read_signal_strength = lgdt330x_read_signal_strength, |
591 | .read_snr = lgdt3302_read_snr, | 590 | .read_snr = lgdt330x_read_snr, |
592 | .read_ucblocks = lgdt3302_read_ucblocks, | 591 | .read_ucblocks = lgdt330x_read_ucblocks, |
593 | .release = lgdt3302_release, | 592 | .release = lgdt330x_release, |
594 | }; | 593 | }; |
595 | 594 | ||
596 | MODULE_DESCRIPTION("LGDT3302 [DViCO FusionHDTV 3 Gold] (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver"); | 595 | MODULE_DESCRIPTION("lgdt330x [DViCO FusionHDTV 3 Gold] (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver"); |
597 | MODULE_AUTHOR("Wilson Michaels"); | 596 | MODULE_AUTHOR("Wilson Michaels"); |
598 | MODULE_LICENSE("GPL"); | 597 | MODULE_LICENSE("GPL"); |
599 | 598 | ||
600 | EXPORT_SYMBOL(lgdt3302_attach); | 599 | EXPORT_SYMBOL(lgdt330x_attach); |
601 | 600 | ||
602 | /* | 601 | /* |
603 | * Local variables: | 602 | * Local variables: |
diff --git a/drivers/media/dvb/frontends/lgdt3302.h b/drivers/media/dvb/frontends/lgdt330x.h index 6bf6f985e080..04986f8e7565 100644 --- a/drivers/media/dvb/frontends/lgdt3302.h +++ b/drivers/media/dvb/frontends/lgdt330x.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
5 | * | 5 | * |
@@ -19,12 +19,12 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef LGDT3302_H | 22 | #ifndef LGDT330X_H |
23 | #define LGDT3302_H | 23 | #define LGDT330X_H |
24 | 24 | ||
25 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
26 | 26 | ||
27 | struct lgdt3302_config | 27 | struct lgdt330x_config |
28 | { | 28 | { |
29 | /* The demodulator's i2c address */ | 29 | /* The demodulator's i2c address */ |
30 | u8 demod_address; | 30 | u8 demod_address; |
@@ -37,10 +37,10 @@ struct lgdt3302_config | |||
37 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); | 37 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
38 | }; | 38 | }; |
39 | 39 | ||
40 | extern struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | 40 | extern struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, |
41 | struct i2c_adapter* i2c); | 41 | struct i2c_adapter* i2c); |
42 | 42 | ||
43 | #endif /* LGDT3302_H */ | 43 | #endif /* LGDT330X_H */ |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Local variables: | 46 | * Local variables: |
diff --git a/drivers/media/dvb/frontends/lgdt3302_priv.h b/drivers/media/dvb/frontends/lgdt330x_priv.h index 6193fa7a569d..4143ce8f1a95 100644 --- a/drivers/media/dvb/frontends/lgdt3302_priv.h +++ b/drivers/media/dvb/frontends/lgdt330x_priv.h | |||
@@ -1,7 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: lgdt3302_priv.h,v 1.2 2005/06/28 23:50:48 mkrufky Exp $ | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM |
3 | * | ||
4 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | ||
5 | * | 3 | * |
6 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
7 | * | 5 | * |
@@ -21,8 +19,8 @@ | |||
21 | * | 19 | * |
22 | */ | 20 | */ |
23 | 21 | ||
24 | #ifndef _LGDT3302_PRIV_ | 22 | #ifndef _LGDT330X_PRIV_ |
25 | #define _LGDT3302_PRIV_ | 23 | #define _LGDT330X_PRIV_ |
26 | 24 | ||
27 | /* i2c control register addresses */ | 25 | /* i2c control register addresses */ |
28 | enum I2C_REG { | 26 | enum I2C_REG { |
@@ -63,7 +61,7 @@ enum I2C_REG { | |||
63 | PACKET_ERR_COUNTER2= 0x6b, | 61 | PACKET_ERR_COUNTER2= 0x6b, |
64 | }; | 62 | }; |
65 | 63 | ||
66 | #endif /* _LGDT3302_PRIV_ */ | 64 | #endif /* _LGDT330X_PRIV_ */ |
67 | 65 | ||
68 | /* | 66 | /* |
69 | * Local variables: | 67 | * Local variables: |