V4L/DVB (4653): Misc fixes for Nova-T 500
authorPatrick Boettcher <pb@linuxtv.org>
Tue, 19 Sep 2006 15:51:56 +0000 (12:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 3 Oct 2006 18:12:57 +0000 (15:12 -0300)
- 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>
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/frontends/dib3000mc.c
drivers/media/dvb/frontends/mt2060.h

index a1a8165ab27242c07a18fad8be489d347904f1d9..dca6c6985661ec2755ba154b0a3f76fb51eec1d5 100644 (file)
@@ -103,8 +103,10 @@ static int dib0700_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num
                        buf[1] |= 1;
 
                        /* special thing in the current firmware: when length is zero the read-failed */
-                       if ((len = dib0700_ctrl_rd(d, buf, msg[i].len + 2, msg[i+1].buf, msg[i+1].len)) <= 0)
+                       if ((len = dib0700_ctrl_rd(d, buf, msg[i].len + 2, msg[i+1].buf, msg[i+1].len)) <= 0) {
+                               deb_info("I2C read failed on address %x\n", msg[i].addr);
                                break;
+                       }
 
                        msg[i+1].len = len;
 
index 182051011c91bba8d07fabeb382fc8402c3f853f..9347febaaba99a610b2c2a89d3784467526fe41a 100644 (file)
@@ -17,7 +17,7 @@
 static struct mt2060_config bristol_mt2060_config[2] = {
        {
                .i2c_address = 0x60,
-               .clock_out   = 1,
+               .clock_out   = 3,
        }, {
                .i2c_address = 0x61,
        }
index 0b051c7d5cd7a8f5882acfeea78c11713e1d3a63..ccc813b525d6d084217bc952a7bffe3bc2d63302 100644 (file)
@@ -312,10 +312,10 @@ static int dib3000mc_init(struct dvb_frontend *demod)
                dib3000mc_write_word(state, 175,  0x0000);
                dib3000mc_write_word(state, 1032, 0x012C);
        }
-       dib3000mc_write_word(state, 1033, 0);
+       dib3000mc_write_word(state, 1033, 0x0000);
 
        // P_clk_cfg
-       dib3000mc_write_word(state, 1037, 12592);
+       dib3000mc_write_word(state, 1037, 0x3130);
 
        // other configurations
 
@@ -412,10 +412,9 @@ static int dib3000mc_sleep(struct dvb_frontend *demod)
 {
        struct dib3000mc_state *state = demod->demodulator_priv;
 
-       dib3000mc_write_word(state, 1037, dib3000mc_read_word(state, 1037) | 0x0003);
        dib3000mc_write_word(state, 1031, 0xFFFF);
        dib3000mc_write_word(state, 1032, 0xFFFF);
-       dib3000mc_write_word(state, 1033, 0xFFF4);   // ****  Bin2
+       dib3000mc_write_word(state, 1033, 0xFFF0);
 
     return 0;
 }
@@ -828,6 +827,8 @@ struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr
 
        dibx000_init_i2c_master(&st->i2c_master, DIB3000MC, st->i2c_adap, st->i2c_addr);
 
+       dib3000mc_write_word(st, 1037, 0x3130);
+
        return demod;
 
 error:
index fc12c790f913f72f732a1da964e1e562249f7eb4..34a37c2b556f01762970d40ea7869f8f8a6cd772 100644 (file)
@@ -27,7 +27,7 @@ struct i2c_adapter;
 
 struct mt2060_config {
        u8 i2c_address;
-       u8 clock_out; /* 0 = off, 1 = CLK/1, 2 = CLK/2, 3 = CLK/4 */
+       u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
 };
 
 extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1);