diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-19 11:51:56 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 14:12:57 -0400 |
commit | 303cbeaaacd449545d259f82b966d070418c58af (patch) | |
tree | ea4ba58a759d6c3fd57d76496cfbfb1b23ed39b2 | |
parent | 01b4bf31ce6ca6c1de31c773fa281a34fd98ff87 (diff) |
V4L/DVB (4653): Misc fixes for Nova-T 500
- forward the clock to the slave undivided
- when sleeping the 3000 do not shutdown the clock
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_core.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dib3000mc.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/mt2060.h | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index a1a8165ab272..dca6c6985661 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -103,8 +103,10 @@ static int dib0700_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num | |||
103 | buf[1] |= 1; | 103 | buf[1] |= 1; |
104 | 104 | ||
105 | /* special thing in the current firmware: when length is zero the read-failed */ | 105 | /* special thing in the current firmware: when length is zero the read-failed */ |
106 | if ((len = dib0700_ctrl_rd(d, buf, msg[i].len + 2, msg[i+1].buf, msg[i+1].len)) <= 0) | 106 | if ((len = dib0700_ctrl_rd(d, buf, msg[i].len + 2, msg[i+1].buf, msg[i+1].len)) <= 0) { |
107 | deb_info("I2C read failed on address %x\n", msg[i].addr); | ||
107 | break; | 108 | break; |
109 | } | ||
108 | 110 | ||
109 | msg[i+1].len = len; | 111 | msg[i+1].len = len; |
110 | 112 | ||
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 182051011c91..9347febaaba9 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -17,7 +17,7 @@ | |||
17 | static struct mt2060_config bristol_mt2060_config[2] = { | 17 | static struct mt2060_config bristol_mt2060_config[2] = { |
18 | { | 18 | { |
19 | .i2c_address = 0x60, | 19 | .i2c_address = 0x60, |
20 | .clock_out = 1, | 20 | .clock_out = 3, |
21 | }, { | 21 | }, { |
22 | .i2c_address = 0x61, | 22 | .i2c_address = 0x61, |
23 | } | 23 | } |
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index 0b051c7d5cd7..ccc813b525d6 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -312,10 +312,10 @@ static int dib3000mc_init(struct dvb_frontend *demod) | |||
312 | dib3000mc_write_word(state, 175, 0x0000); | 312 | dib3000mc_write_word(state, 175, 0x0000); |
313 | dib3000mc_write_word(state, 1032, 0x012C); | 313 | dib3000mc_write_word(state, 1032, 0x012C); |
314 | } | 314 | } |
315 | dib3000mc_write_word(state, 1033, 0); | 315 | dib3000mc_write_word(state, 1033, 0x0000); |
316 | 316 | ||
317 | // P_clk_cfg | 317 | // P_clk_cfg |
318 | dib3000mc_write_word(state, 1037, 12592); | 318 | dib3000mc_write_word(state, 1037, 0x3130); |
319 | 319 | ||
320 | // other configurations | 320 | // other configurations |
321 | 321 | ||
@@ -412,10 +412,9 @@ static int dib3000mc_sleep(struct dvb_frontend *demod) | |||
412 | { | 412 | { |
413 | struct dib3000mc_state *state = demod->demodulator_priv; | 413 | struct dib3000mc_state *state = demod->demodulator_priv; |
414 | 414 | ||
415 | dib3000mc_write_word(state, 1037, dib3000mc_read_word(state, 1037) | 0x0003); | ||
416 | dib3000mc_write_word(state, 1031, 0xFFFF); | 415 | dib3000mc_write_word(state, 1031, 0xFFFF); |
417 | dib3000mc_write_word(state, 1032, 0xFFFF); | 416 | dib3000mc_write_word(state, 1032, 0xFFFF); |
418 | dib3000mc_write_word(state, 1033, 0xFFF4); // **** Bin2 | 417 | dib3000mc_write_word(state, 1033, 0xFFF0); |
419 | 418 | ||
420 | return 0; | 419 | return 0; |
421 | } | 420 | } |
@@ -828,6 +827,8 @@ struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr | |||
828 | 827 | ||
829 | dibx000_init_i2c_master(&st->i2c_master, DIB3000MC, st->i2c_adap, st->i2c_addr); | 828 | dibx000_init_i2c_master(&st->i2c_master, DIB3000MC, st->i2c_adap, st->i2c_addr); |
830 | 829 | ||
830 | dib3000mc_write_word(st, 1037, 0x3130); | ||
831 | |||
831 | return demod; | 832 | return demod; |
832 | 833 | ||
833 | error: | 834 | error: |
diff --git a/drivers/media/dvb/frontends/mt2060.h b/drivers/media/dvb/frontends/mt2060.h index fc12c790f913..34a37c2b556f 100644 --- a/drivers/media/dvb/frontends/mt2060.h +++ b/drivers/media/dvb/frontends/mt2060.h | |||
@@ -27,7 +27,7 @@ struct i2c_adapter; | |||
27 | 27 | ||
28 | struct mt2060_config { | 28 | struct mt2060_config { |
29 | u8 i2c_address; | 29 | u8 i2c_address; |
30 | u8 clock_out; /* 0 = off, 1 = CLK/1, 2 = CLK/2, 3 = CLK/4 */ | 30 | u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */ |
31 | }; | 31 | }; |
32 | 32 | ||
33 | extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1); | 33 | extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1); |