aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-26 20:04:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-26 20:04:47 -0500
commit74ea15d909b31158f9b63190a95b52bc05586d4b (patch)
tree004badd652ac576dacf5e3c18cc781785eedea9d
parentc75d5c5d82146636560ad5b91f3544ae60fc1c57 (diff)
parentc79eba92406acc4898adcd1689fc21a6aa91ed0b (diff)
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
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.c11
-rw-r--r--drivers/media/dvb/dvb-usb/cinergyT2-fe.c7
-rw-r--r--drivers/media/dvb/frontends/cxd2820r.h6
-rw-r--r--drivers/media/dvb/frontends/cxd2820r_core.c20
-rw-r--r--drivers/media/video/atmel-isi.c14
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c3
6 files changed, 45 insertions, 16 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index 1455e2644ab5..cf0c318d6989 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -887,8 +887,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap)
887 887
888 /* attach demod */ 888 /* attach demod */
889 adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach, 889 adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach,
890 &anysee_cxd2820r_config, &adap->dev->i2c_adap, 890 &anysee_cxd2820r_config, &adap->dev->i2c_adap);
891 NULL);
892 891
893 state->has_ci = true; 892 state->has_ci = true;
894 893
@@ -1189,6 +1188,14 @@ static int anysee_ci_init(struct dvb_usb_device *d)
1189 if (ret) 1188 if (ret)
1190 return ret; 1189 return ret;
1191 1190
1191 ret = anysee_wr_reg_mask(d, REG_IOD, (0 << 2)|(0 << 1)|(0 << 0), 0x07);
1192 if (ret)
1193 return ret;
1194
1195 ret = anysee_wr_reg_mask(d, REG_IOD, (1 << 2)|(1 << 1)|(1 << 0), 0x07);
1196 if (ret)
1197 return ret;
1198
1192 ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1); 1199 ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1);
1193 if (ret) 1200 if (ret)
1194 return ret; 1201 return ret;
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-fe.c b/drivers/media/dvb/dvb-usb/cinergyT2-fe.c
index 8a57ed8272de..1efc028a76c9 100644
--- a/drivers/media/dvb/dvb-usb/cinergyT2-fe.c
+++ b/drivers/media/dvb/dvb-usb/cinergyT2-fe.c
@@ -276,14 +276,15 @@ static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe)
276 param.flags = 0; 276 param.flags = 0;
277 277
278 switch (fep->bandwidth_hz) { 278 switch (fep->bandwidth_hz) {
279 default:
279 case 8000000: 280 case 8000000:
280 param.bandwidth = 0; 281 param.bandwidth = 8;
281 break; 282 break;
282 case 7000000: 283 case 7000000:
283 param.bandwidth = 1; 284 param.bandwidth = 7;
284 break; 285 break;
285 case 6000000: 286 case 6000000:
286 param.bandwidth = 2; 287 param.bandwidth = 6;
287 break; 288 break;
288 } 289 }
289 290
diff --git a/drivers/media/dvb/frontends/cxd2820r.h b/drivers/media/dvb/frontends/cxd2820r.h
index cf0f546aa1d1..5aa306ebb7ef 100644
--- a/drivers/media/dvb/frontends/cxd2820r.h
+++ b/drivers/media/dvb/frontends/cxd2820r.h
@@ -77,14 +77,12 @@ struct cxd2820r_config {
77 (defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE)) 77 (defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE))
78extern struct dvb_frontend *cxd2820r_attach( 78extern struct dvb_frontend *cxd2820r_attach(
79 const struct cxd2820r_config *config, 79 const struct cxd2820r_config *config,
80 struct i2c_adapter *i2c, 80 struct i2c_adapter *i2c
81 struct dvb_frontend *fe
82); 81);
83#else 82#else
84static inline struct dvb_frontend *cxd2820r_attach( 83static inline struct dvb_frontend *cxd2820r_attach(
85 const struct cxd2820r_config *config, 84 const struct cxd2820r_config *config,
86 struct i2c_adapter *i2c, 85 struct i2c_adapter *i2c
87 struct dvb_frontend *fe
88) 86)
89{ 87{
90 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 88 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c
index caae7f79c837..5c7c2aaf9bf5 100644
--- a/drivers/media/dvb/frontends/cxd2820r_core.c
+++ b/drivers/media/dvb/frontends/cxd2820r_core.c
@@ -482,10 +482,19 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
482 482
483 /* switch between DVB-T and DVB-T2 when tune fails */ 483 /* switch between DVB-T and DVB-T2 when tune fails */
484 if (priv->last_tune_failed) { 484 if (priv->last_tune_failed) {
485 if (priv->delivery_system == SYS_DVBT) 485 if (priv->delivery_system == SYS_DVBT) {
486 ret = cxd2820r_sleep_t(fe);
487 if (ret)
488 goto error;
489
486 c->delivery_system = SYS_DVBT2; 490 c->delivery_system = SYS_DVBT2;
487 else if (priv->delivery_system == SYS_DVBT2) 491 } else if (priv->delivery_system == SYS_DVBT2) {
492 ret = cxd2820r_sleep_t2(fe);
493 if (ret)
494 goto error;
495
488 c->delivery_system = SYS_DVBT; 496 c->delivery_system = SYS_DVBT;
497 }
489 } 498 }
490 499
491 /* set frontend */ 500 /* set frontend */
@@ -562,7 +571,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
562 .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A }, 571 .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },
563 /* default: DVB-T/T2 */ 572 /* default: DVB-T/T2 */
564 .info = { 573 .info = {
565 .name = "Sony CXD2820R (DVB-T/T2)", 574 .name = "Sony CXD2820R",
566 575
567 .caps = FE_CAN_FEC_1_2 | 576 .caps = FE_CAN_FEC_1_2 |
568 FE_CAN_FEC_2_3 | 577 FE_CAN_FEC_2_3 |
@@ -572,7 +581,9 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
572 FE_CAN_FEC_AUTO | 581 FE_CAN_FEC_AUTO |
573 FE_CAN_QPSK | 582 FE_CAN_QPSK |
574 FE_CAN_QAM_16 | 583 FE_CAN_QAM_16 |
584 FE_CAN_QAM_32 |
575 FE_CAN_QAM_64 | 585 FE_CAN_QAM_64 |
586 FE_CAN_QAM_128 |
576 FE_CAN_QAM_256 | 587 FE_CAN_QAM_256 |
577 FE_CAN_QAM_AUTO | 588 FE_CAN_QAM_AUTO |
578 FE_CAN_TRANSMISSION_MODE_AUTO | 589 FE_CAN_TRANSMISSION_MODE_AUTO |
@@ -602,8 +613,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
602}; 613};
603 614
604struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg, 615struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg,
605 struct i2c_adapter *i2c, 616 struct i2c_adapter *i2c)
606 struct dvb_frontend *fe)
607{ 617{
608 struct cxd2820r_priv *priv = NULL; 618 struct cxd2820r_priv *priv = NULL;
609 int ret; 619 int ret;
diff --git a/drivers/media/video/atmel-isi.c b/drivers/media/video/atmel-isi.c
index 9fe4519176a4..ec3f6a06f9c3 100644
--- a/drivers/media/video/atmel-isi.c
+++ b/drivers/media/video/atmel-isi.c
@@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev)
922 isi->fb_descriptors_phys); 922 isi->fb_descriptors_phys);
923 923
924 iounmap(isi->regs); 924 iounmap(isi->regs);
925 clk_unprepare(isi->mck);
925 clk_put(isi->mck); 926 clk_put(isi->mck);
927 clk_unprepare(isi->pclk);
926 clk_put(isi->pclk); 928 clk_put(isi->pclk);
927 kfree(isi); 929 kfree(isi);
928 930
@@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
955 if (IS_ERR(pclk)) 957 if (IS_ERR(pclk))
956 return PTR_ERR(pclk); 958 return PTR_ERR(pclk);
957 959
960 ret = clk_prepare(pclk);
961 if (ret)
962 goto err_clk_prepare_pclk;
963
958 isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL); 964 isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL);
959 if (!isi) { 965 if (!isi) {
960 ret = -ENOMEM; 966 ret = -ENOMEM;
@@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
978 goto err_clk_get; 984 goto err_clk_get;
979 } 985 }
980 986
987 ret = clk_prepare(isi->mck);
988 if (ret)
989 goto err_clk_prepare_mck;
990
981 /* Set ISI_MCK's frequency, it should be faster than pixel clock */ 991 /* Set ISI_MCK's frequency, it should be faster than pixel clock */
982 ret = clk_set_rate(isi->mck, pdata->mck_hz); 992 ret = clk_set_rate(isi->mck, pdata->mck_hz);
983 if (ret < 0) 993 if (ret < 0)
@@ -1059,10 +1069,14 @@ err_alloc_ctx:
1059 isi->fb_descriptors_phys); 1069 isi->fb_descriptors_phys);
1060err_alloc_descriptors: 1070err_alloc_descriptors:
1061err_set_mck_rate: 1071err_set_mck_rate:
1072 clk_unprepare(isi->mck);
1073err_clk_prepare_mck:
1062 clk_put(isi->mck); 1074 clk_put(isi->mck);
1063err_clk_get: 1075err_clk_get:
1064 kfree(isi); 1076 kfree(isi);
1065err_alloc_isi: 1077err_alloc_isi:
1078 clk_unprepare(pclk);
1079err_clk_prepare_pclk:
1066 clk_put(pclk); 1080 clk_put(pclk);
1067 1081
1068 return ret; 1082 return ret;
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 9449423098e0..aabbf4854f66 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -853,8 +853,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
853 case EM28174_BOARD_PCTV_290E: 853 case EM28174_BOARD_PCTV_290E:
854 dvb->fe[0] = dvb_attach(cxd2820r_attach, 854 dvb->fe[0] = dvb_attach(cxd2820r_attach,
855 &em28xx_cxd2820r_config, 855 &em28xx_cxd2820r_config,
856 &dev->i2c_adap, 856 &dev->i2c_adap);
857 NULL);
858 if (dvb->fe[0]) { 857 if (dvb->fe[0]) {
859 /* FE 0 attach tuner */ 858 /* FE 0 attach tuner */
860 if (!dvb_attach(tda18271_attach, 859 if (!dvb_attach(tda18271_attach,