[PATCH] dvb: tda1004x: allow N_I2C to be overridden by the card driver
authorJohannes Stezenbach <js@linuxtv.org>
Tue, 17 May 2005 04:54:35 +0000 (21:54 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 17 May 2005 14:59:31 +0000 (07:59 -0700)
allow N_I2C to be overridden by the card driver (Andreas Oberritter)

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/frontends/tda1004x.c
drivers/media/dvb/frontends/tda1004x.h

index 6dd428b7c9e87a4596340db1c0c82cb26610fec5..ecfa8c7a97845ac0a8226588398532513552fd98 100644 (file)
@@ -406,7 +406,7 @@ static int tda10046_fwupload(struct dvb_frontend* fe)
 
        /* set parameters */
        tda1004x_write_byteI(state, TDA10046H_CONFPLL2, 10);
-       tda1004x_write_byteI(state, TDA10046H_CONFPLL3, 0);
+       tda1004x_write_byteI(state, TDA10046H_CONFPLL3, state->config->n_i2c);
        tda1004x_write_byteI(state, TDA10046H_FREQ_OFFSET, 99);
        tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0xd4);
        tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x2c);
@@ -547,7 +547,7 @@ static int tda10046_init(struct dvb_frontend* fe)
        tda1004x_write_mask(state, TDA1004X_AUTO, 8, 0); // select HP stream
        tda1004x_write_mask(state, TDA1004X_CONFC1, 0x80, 0); // disable pulse killer
        tda1004x_write_byteI(state, TDA10046H_CONFPLL2, 10); // PLL M = 10
-       tda1004x_write_byteI(state, TDA10046H_CONFPLL3, 0); // PLL P = N = 0
+       tda1004x_write_byteI(state, TDA10046H_CONFPLL3, state->config->n_i2c); // PLL P = N = 0
        tda1004x_write_byteI(state, TDA10046H_FREQ_OFFSET, 99); // FREQOFFS = 99
        tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0xd4); // } PHY2 = -11221
        tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x2c); // }
index 196a375a16e4bed9cc17b0573b1b3ff13a502316..c8e1d54ff26283b0b9a475f1fa2a5006d34922a4 100644 (file)
@@ -37,6 +37,9 @@ struct tda1004x_config
        /* Does the OCLK signal need inverted? */
        u8 invert_oclk;
 
+       /* value of N_I2C of the CONF_PLL3 register */
+       u8 n_i2c;
+
        /* PLL maintenance */
        int (*pll_init)(struct dvb_frontend* fe);
        int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);