|
@@ -236,7 +236,7 @@ static struct tda18271_std_map mb86a20s_tda18271_std_map = {
|
|
|
|
|
|
static struct tda18271_config kworld_tda18271_config = {
|
|
|
.std_map = &mb86a20s_tda18271_std_map,
|
|
|
- .gate = TDA18271_GATE_DIGITAL,
|
|
|
+ .gate = TDA18271_GATE_ANALOG,
|
|
|
};
|
|
|
|
|
|
static const struct mb86a20s_config kworld_mb86a20s_config = {
|
|
@@ -623,37 +623,6 @@ static struct tda827x_config tda827x_cfg_2_sw42 = {
|
|
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
|
|
|
|
-static int __kworld_sbtvd_i2c_gate_ctrl(struct saa7134_dev *dev, int enable)
|
|
|
-{
|
|
|
- unsigned char initmsg[] = {0x45, 0x97};
|
|
|
- unsigned char msg_enable[] = {0x45, 0xc1};
|
|
|
- unsigned char msg_disable[] = {0x45, 0x81};
|
|
|
- struct i2c_msg msg = {.addr = 0x4b, .flags = 0, .buf = initmsg, .len = 2};
|
|
|
-
|
|
|
- if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) {
|
|
|
- wprintk("could not access the I2C gate\n");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- if (enable)
|
|
|
- msg.buf = msg_enable;
|
|
|
- else
|
|
|
- msg.buf = msg_disable;
|
|
|
- if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) {
|
|
|
- wprintk("could not access the I2C gate\n");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- msleep(20);
|
|
|
- return 0;
|
|
|
-}
|
|
|
-static int kworld_sbtvd_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
|
|
|
-{
|
|
|
- struct saa7134_dev *dev = fe->dvb->priv;
|
|
|
-
|
|
|
- return __kworld_sbtvd_i2c_gate_ctrl(dev, enable);
|
|
|
-}
|
|
|
-
|
|
|
-/* ------------------------------------------------------------------ */
|
|
|
-
|
|
|
static struct tda1004x_config tda827x_lifeview_config = {
|
|
|
.demod_address = 0x08,
|
|
|
.invert = 1,
|
|
@@ -1660,7 +1629,6 @@ static int dvb_init(struct saa7134_dev *dev)
|
|
|
}
|
|
|
break;
|
|
|
case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG:
|
|
|
- __kworld_sbtvd_i2c_gate_ctrl(dev, 0);
|
|
|
saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0x14000);
|
|
|
saa_writel(SAA7134_GPIO_GPSTATUS0 >> 2, 0x14000);
|
|
|
msleep(20);
|
|
@@ -1670,16 +1638,10 @@ static int dvb_init(struct saa7134_dev *dev)
|
|
|
fe0->dvb.frontend = dvb_attach(mb86a20s_attach,
|
|
|
&kworld_mb86a20s_config,
|
|
|
&dev->i2c_adap);
|
|
|
- __kworld_sbtvd_i2c_gate_ctrl(dev, 1);
|
|
|
if (fe0->dvb.frontend != NULL) {
|
|
|
dvb_attach(tda18271_attach, fe0->dvb.frontend,
|
|
|
0x60, &dev->i2c_adap,
|
|
|
&kworld_tda18271_config);
|
|
|
- /*
|
|
|
- * Only after success, it can initialize the gate, otherwise
|
|
|
- * an OOPS will hit, due to kfree(fe0->dvb.frontend)
|
|
|
- */
|
|
|
- fe0->dvb.frontend->ops.i2c_gate_ctrl = kworld_sbtvd_i2c_gate_ctrl;
|
|
|
}
|
|
|
break;
|
|
|
default:
|