Commit 7a893ba9 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] af9035: bind fc2580 using I2C binding

Change fc2580 driver from media binding to I2C client binding.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 35fc0e0f
...@@ -1265,11 +1265,6 @@ static struct tda18218_config af9035_tda18218_config = { ...@@ -1265,11 +1265,6 @@ static struct tda18218_config af9035_tda18218_config = {
.i2c_wr_max = 21, .i2c_wr_max = 21,
}; };
static const struct fc2580_config af9035_fc2580_config = {
.i2c_addr = 0x56,
.clock = 16384000,
};
static const struct fc0012_config af9035_fc0012_config[] = { static const struct fc0012_config af9035_fc0012_config[] = {
{ {
.i2c_address = 0x63, .i2c_address = 0x63,
...@@ -1390,7 +1385,11 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) ...@@ -1390,7 +1385,11 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
fe = dvb_attach(tda18218_attach, adap->fe[0], fe = dvb_attach(tda18218_attach, adap->fe[0],
&d->i2c_adap, &af9035_tda18218_config); &d->i2c_adap, &af9035_tda18218_config);
break; break;
case AF9033_TUNER_FC2580: case AF9033_TUNER_FC2580: {
struct fc2580_platform_data fc2580_pdata = {
.dvb_frontend = adap->fe[0],
};
/* Tuner enable using gpiot2_o, gpiot2_en and gpiot2_on */ /* Tuner enable using gpiot2_o, gpiot2_en and gpiot2_on */
ret = af9035_wr_reg_mask(d, 0xd8eb, 0x01, 0x01); ret = af9035_wr_reg_mask(d, 0xd8eb, 0x01, 0x01);
if (ret < 0) if (ret < 0)
...@@ -1406,9 +1405,14 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) ...@@ -1406,9 +1405,14 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
usleep_range(10000, 50000); usleep_range(10000, 50000);
/* attach tuner */ /* attach tuner */
fe = dvb_attach(fc2580_attach, adap->fe[0], ret = af9035_add_i2c_dev(d, "fc2580", 0x56, &fc2580_pdata,
&d->i2c_adap, &af9035_fc2580_config); &d->i2c_adap);
if (ret)
goto err;
fe = adap->fe[0];
break; break;
}
case AF9033_TUNER_FC0012: case AF9033_TUNER_FC0012:
/* /*
* AF9035 gpiot2 = FC0012 enable * AF9035 gpiot2 = FC0012 enable
...@@ -1612,6 +1616,7 @@ static int af9035_tuner_detach(struct dvb_usb_adapter *adap) ...@@ -1612,6 +1616,7 @@ static int af9035_tuner_detach(struct dvb_usb_adapter *adap)
dev_dbg(&d->udev->dev, "%s: adap->id=%d\n", __func__, adap->id); dev_dbg(&d->udev->dev, "%s: adap->id=%d\n", __func__, adap->id);
switch (state->af9033_config[adap->id].tuner) { switch (state->af9033_config[adap->id].tuner) {
case AF9033_TUNER_FC2580:
case AF9033_TUNER_IT9135_38: case AF9033_TUNER_IT9135_38:
case AF9033_TUNER_IT9135_51: case AF9033_TUNER_IT9135_51:
case AF9033_TUNER_IT9135_52: case AF9033_TUNER_IT9135_52:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment