Commit 74ea15d9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] cinergyT2-fe: Fix bandwdith settings
  [media] V4L: atmel-isi: add clk_prepare()/clk_unprepare() functions
  [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
  [media] anysee: fix CI init
  [media] cxd2820r: remove unused parameter from cxd2820r_attach
  [media] cxd2820r: fix dvb_frontend_ops
parents c75d5c5d c79eba92
...@@ -887,8 +887,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) ...@@ -887,8 +887,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap)
/* attach demod */ /* attach demod */
adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach, adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach,
&anysee_cxd2820r_config, &adap->dev->i2c_adap, &anysee_cxd2820r_config, &adap->dev->i2c_adap);
NULL);
state->has_ci = true; state->has_ci = true;
...@@ -1189,6 +1188,14 @@ static int anysee_ci_init(struct dvb_usb_device *d) ...@@ -1189,6 +1188,14 @@ static int anysee_ci_init(struct dvb_usb_device *d)
if (ret) if (ret)
return ret; return ret;
ret = anysee_wr_reg_mask(d, REG_IOD, (0 << 2)|(0 << 1)|(0 << 0), 0x07);
if (ret)
return ret;
ret = anysee_wr_reg_mask(d, REG_IOD, (1 << 2)|(1 << 1)|(1 << 0), 0x07);
if (ret)
return ret;
ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1); ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1);
if (ret) if (ret)
return ret; return ret;
......
...@@ -276,14 +276,15 @@ static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe) ...@@ -276,14 +276,15 @@ static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe)
param.flags = 0; param.flags = 0;
switch (fep->bandwidth_hz) { switch (fep->bandwidth_hz) {
default:
case 8000000: case 8000000:
param.bandwidth = 0; param.bandwidth = 8;
break; break;
case 7000000: case 7000000:
param.bandwidth = 1; param.bandwidth = 7;
break; break;
case 6000000: case 6000000:
param.bandwidth = 2; param.bandwidth = 6;
break; break;
} }
......
...@@ -77,14 +77,12 @@ struct cxd2820r_config { ...@@ -77,14 +77,12 @@ struct cxd2820r_config {
(defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE)) (defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE))
extern struct dvb_frontend *cxd2820r_attach( extern struct dvb_frontend *cxd2820r_attach(
const struct cxd2820r_config *config, const struct cxd2820r_config *config,
struct i2c_adapter *i2c, struct i2c_adapter *i2c
struct dvb_frontend *fe
); );
#else #else
static inline struct dvb_frontend *cxd2820r_attach( static inline struct dvb_frontend *cxd2820r_attach(
const struct cxd2820r_config *config, const struct cxd2820r_config *config,
struct i2c_adapter *i2c, struct i2c_adapter *i2c
struct dvb_frontend *fe
) )
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
......
...@@ -482,10 +482,19 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe) ...@@ -482,10 +482,19 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
/* switch between DVB-T and DVB-T2 when tune fails */ /* switch between DVB-T and DVB-T2 when tune fails */
if (priv->last_tune_failed) { if (priv->last_tune_failed) {
if (priv->delivery_system == SYS_DVBT) if (priv->delivery_system == SYS_DVBT) {
ret = cxd2820r_sleep_t(fe);
if (ret)
goto error;
c->delivery_system = SYS_DVBT2; c->delivery_system = SYS_DVBT2;
else if (priv->delivery_system == SYS_DVBT2) } else if (priv->delivery_system == SYS_DVBT2) {
ret = cxd2820r_sleep_t2(fe);
if (ret)
goto error;
c->delivery_system = SYS_DVBT; c->delivery_system = SYS_DVBT;
}
} }
/* set frontend */ /* set frontend */
...@@ -562,7 +571,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = { ...@@ -562,7 +571,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
.delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A }, .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },
/* default: DVB-T/T2 */ /* default: DVB-T/T2 */
.info = { .info = {
.name = "Sony CXD2820R (DVB-T/T2)", .name = "Sony CXD2820R",
.caps = FE_CAN_FEC_1_2 | .caps = FE_CAN_FEC_1_2 |
FE_CAN_FEC_2_3 | FE_CAN_FEC_2_3 |
...@@ -572,7 +581,9 @@ static const struct dvb_frontend_ops cxd2820r_ops = { ...@@ -572,7 +581,9 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
FE_CAN_FEC_AUTO | FE_CAN_FEC_AUTO |
FE_CAN_QPSK | FE_CAN_QPSK |
FE_CAN_QAM_16 | FE_CAN_QAM_16 |
FE_CAN_QAM_32 |
FE_CAN_QAM_64 | FE_CAN_QAM_64 |
FE_CAN_QAM_128 |
FE_CAN_QAM_256 | FE_CAN_QAM_256 |
FE_CAN_QAM_AUTO | FE_CAN_QAM_AUTO |
FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
...@@ -602,8 +613,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = { ...@@ -602,8 +613,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
}; };
struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg, struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg,
struct i2c_adapter *i2c, struct i2c_adapter *i2c)
struct dvb_frontend *fe)
{ {
struct cxd2820r_priv *priv = NULL; struct cxd2820r_priv *priv = NULL;
int ret; int ret;
......
...@@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev) ...@@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev)
isi->fb_descriptors_phys); isi->fb_descriptors_phys);
iounmap(isi->regs); iounmap(isi->regs);
clk_unprepare(isi->mck);
clk_put(isi->mck); clk_put(isi->mck);
clk_unprepare(isi->pclk);
clk_put(isi->pclk); clk_put(isi->pclk);
kfree(isi); kfree(isi);
...@@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev) ...@@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
if (IS_ERR(pclk)) if (IS_ERR(pclk))
return PTR_ERR(pclk); return PTR_ERR(pclk);
ret = clk_prepare(pclk);
if (ret)
goto err_clk_prepare_pclk;
isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL); isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL);
if (!isi) { if (!isi) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev) ...@@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
goto err_clk_get; goto err_clk_get;
} }
ret = clk_prepare(isi->mck);
if (ret)
goto err_clk_prepare_mck;
/* Set ISI_MCK's frequency, it should be faster than pixel clock */ /* Set ISI_MCK's frequency, it should be faster than pixel clock */
ret = clk_set_rate(isi->mck, pdata->mck_hz); ret = clk_set_rate(isi->mck, pdata->mck_hz);
if (ret < 0) if (ret < 0)
...@@ -1059,10 +1069,14 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev) ...@@ -1059,10 +1069,14 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
isi->fb_descriptors_phys); isi->fb_descriptors_phys);
err_alloc_descriptors: err_alloc_descriptors:
err_set_mck_rate: err_set_mck_rate:
clk_unprepare(isi->mck);
err_clk_prepare_mck:
clk_put(isi->mck); clk_put(isi->mck);
err_clk_get: err_clk_get:
kfree(isi); kfree(isi);
err_alloc_isi: err_alloc_isi:
clk_unprepare(pclk);
err_clk_prepare_pclk:
clk_put(pclk); clk_put(pclk);
return ret; return ret;
......
...@@ -853,8 +853,7 @@ static int em28xx_dvb_init(struct em28xx *dev) ...@@ -853,8 +853,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
case EM28174_BOARD_PCTV_290E: case EM28174_BOARD_PCTV_290E:
dvb->fe[0] = dvb_attach(cxd2820r_attach, dvb->fe[0] = dvb_attach(cxd2820r_attach,
&em28xx_cxd2820r_config, &em28xx_cxd2820r_config,
&dev->i2c_adap, &dev->i2c_adap);
NULL);
if (dvb->fe[0]) { if (dvb->fe[0]) {
/* FE 0 attach tuner */ /* FE 0 attach tuner */
if (!dvb_attach(tda18271_attach, if (!dvb_attach(tda18271_attach,
......
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