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

[media] rtl28xxu: use platform data config for rtl2832 demod

Use platform data configuration for rtl2832 demod driver. Old
configuration are still left as it is used for rtl2832_sdr driver.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent e1174d78
...@@ -637,6 +637,32 @@ static int rtl2831u_frontend_attach(struct dvb_usb_adapter *adap) ...@@ -637,6 +637,32 @@ static int rtl2831u_frontend_attach(struct dvb_usb_adapter *adap)
return ret; return ret;
} }
static const struct rtl2832_platform_data rtl2832_fc0012_platform_data = {
.clk = 28800000,
.tuner = TUNER_RTL2832_FC0012
};
static const struct rtl2832_platform_data rtl2832_fc0013_platform_data = {
.clk = 28800000,
.tuner = TUNER_RTL2832_FC0013
};
static const struct rtl2832_platform_data rtl2832_tua9001_platform_data = {
.clk = 28800000,
.tuner = TUNER_RTL2832_TUA9001,
};
static const struct rtl2832_platform_data rtl2832_e4000_platform_data = {
.clk = 28800000,
.tuner = TUNER_RTL2832_E4000,
};
static const struct rtl2832_platform_data rtl2832_r820t_platform_data = {
.clk = 28800000,
.tuner = TUNER_RTL2832_R820T,
};
/* TODO: these are redundant information for rtl2832_sdr driver */
static const struct rtl2832_config rtl28xxu_rtl2832_fc0012_config = { static const struct rtl2832_config rtl28xxu_rtl2832_fc0012_config = {
.i2c_addr = 0x10, /* 0x20 */ .i2c_addr = 0x10, /* 0x20 */
.xtal = 28800000, .xtal = 28800000,
...@@ -793,24 +819,24 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) ...@@ -793,24 +819,24 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
switch (priv->tuner) { switch (priv->tuner) {
case TUNER_RTL2832_FC0012: case TUNER_RTL2832_FC0012:
pdata->config = &rtl28xxu_rtl2832_fc0012_config; *pdata = rtl2832_fc0012_platform_data;
break; break;
case TUNER_RTL2832_FC0013: case TUNER_RTL2832_FC0013:
pdata->config = &rtl28xxu_rtl2832_fc0013_config; *pdata = rtl2832_fc0013_platform_data;
break; break;
case TUNER_RTL2832_FC2580: case TUNER_RTL2832_FC2580:
/* FIXME: do not abuse fc0012 settings */ /* FIXME: do not abuse fc0012 settings */
pdata->config = &rtl28xxu_rtl2832_fc0012_config; *pdata = rtl2832_fc0012_platform_data;
break; break;
case TUNER_RTL2832_TUA9001: case TUNER_RTL2832_TUA9001:
pdata->config = &rtl28xxu_rtl2832_tua9001_config; *pdata = rtl2832_tua9001_platform_data;
break; break;
case TUNER_RTL2832_E4000: case TUNER_RTL2832_E4000:
pdata->config = &rtl28xxu_rtl2832_e4000_config; *pdata = rtl2832_e4000_platform_data;
break; break;
case TUNER_RTL2832_R820T: case TUNER_RTL2832_R820T:
case TUNER_RTL2832_R828D: case TUNER_RTL2832_R828D:
pdata->config = &rtl28xxu_rtl2832_r820t_config; *pdata = rtl2832_r820t_platform_data;
break; break;
default: default:
dev_err(&d->udev->dev, "%s: unknown tuner=%s\n", dev_err(&d->udev->dev, "%s: unknown tuner=%s\n",
......
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