diff options
| -rw-r--r-- | drivers/media/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/media/platform/exynos4-is/fimc-is.c | 26 | ||||
| -rw-r--r-- | drivers/media/platform/exynos4-is/fimc-is.h | 1 | ||||
| -rw-r--r-- | drivers/media/platform/s5p-jpeg/Makefile | 2 | ||||
| -rw-r--r-- | drivers/media/platform/s5p-mfc/Makefile | 2 | ||||
| -rw-r--r-- | drivers/media/tuners/Kconfig | 20 | ||||
| -rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 6 |
7 files changed, 22 insertions, 47 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 7f5a7cac6dc7..8270388e2a0d 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
| @@ -136,9 +136,9 @@ config DVB_NET | |||
| 136 | 136 | ||
| 137 | # This Kconfig option is used by both PCI and USB drivers | 137 | # This Kconfig option is used by both PCI and USB drivers |
| 138 | config TTPCI_EEPROM | 138 | config TTPCI_EEPROM |
| 139 | tristate | 139 | tristate |
| 140 | depends on I2C | 140 | depends on I2C |
| 141 | default n | 141 | default n |
| 142 | 142 | ||
| 143 | source "drivers/media/dvb-core/Kconfig" | 143 | source "drivers/media/dvb-core/Kconfig" |
| 144 | 144 | ||
| @@ -189,6 +189,12 @@ config MEDIA_SUBDRV_AUTOSELECT | |||
| 189 | 189 | ||
| 190 | If unsure say Y. | 190 | If unsure say Y. |
| 191 | 191 | ||
| 192 | config MEDIA_ATTACH | ||
| 193 | bool | ||
| 194 | depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT | ||
| 195 | depends on MODULES | ||
| 196 | default MODULES | ||
| 197 | |||
| 192 | source "drivers/media/i2c/Kconfig" | 198 | source "drivers/media/i2c/Kconfig" |
| 193 | source "drivers/media/tuners/Kconfig" | 199 | source "drivers/media/tuners/Kconfig" |
| 194 | source "drivers/media/dvb-frontends/Kconfig" | 200 | source "drivers/media/dvb-frontends/Kconfig" |
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 520e4398b69c..0741945b79ed 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c | |||
| @@ -834,23 +834,11 @@ static int fimc_is_probe(struct platform_device *pdev) | |||
| 834 | goto err_clk; | 834 | goto err_clk; |
| 835 | } | 835 | } |
| 836 | pm_runtime_enable(dev); | 836 | pm_runtime_enable(dev); |
| 837 | /* | ||
| 838 | * Enable only the ISP power domain, keep FIMC-IS clocks off until | ||
| 839 | * the whole clock tree is configured. The ISP power domain needs | ||
| 840 | * be active in order to acces any CMU_ISP clock registers. | ||
| 841 | */ | ||
| 842 | ret = pm_runtime_get_sync(dev); | ||
| 843 | if (ret < 0) | ||
| 844 | goto err_irq; | ||
| 845 | |||
| 846 | ret = fimc_is_setup_clocks(is); | ||
| 847 | pm_runtime_put_sync(dev); | ||
| 848 | 837 | ||
| 838 | ret = pm_runtime_get_sync(dev); | ||
| 849 | if (ret < 0) | 839 | if (ret < 0) |
| 850 | goto err_irq; | 840 | goto err_irq; |
| 851 | 841 | ||
| 852 | is->clk_init = true; | ||
| 853 | |||
| 854 | is->alloc_ctx = vb2_dma_contig_init_ctx(dev); | 842 | is->alloc_ctx = vb2_dma_contig_init_ctx(dev); |
| 855 | if (IS_ERR(is->alloc_ctx)) { | 843 | if (IS_ERR(is->alloc_ctx)) { |
| 856 | ret = PTR_ERR(is->alloc_ctx); | 844 | ret = PTR_ERR(is->alloc_ctx); |
| @@ -872,6 +860,8 @@ static int fimc_is_probe(struct platform_device *pdev) | |||
| 872 | if (ret < 0) | 860 | if (ret < 0) |
| 873 | goto err_dfs; | 861 | goto err_dfs; |
| 874 | 862 | ||
| 863 | pm_runtime_put_sync(dev); | ||
| 864 | |||
| 875 | dev_dbg(dev, "FIMC-IS registered successfully\n"); | 865 | dev_dbg(dev, "FIMC-IS registered successfully\n"); |
| 876 | return 0; | 866 | return 0; |
| 877 | 867 | ||
| @@ -891,9 +881,11 @@ err_clk: | |||
| 891 | static int fimc_is_runtime_resume(struct device *dev) | 881 | static int fimc_is_runtime_resume(struct device *dev) |
| 892 | { | 882 | { |
| 893 | struct fimc_is *is = dev_get_drvdata(dev); | 883 | struct fimc_is *is = dev_get_drvdata(dev); |
| 884 | int ret; | ||
| 894 | 885 | ||
| 895 | if (!is->clk_init) | 886 | ret = fimc_is_setup_clocks(is); |
| 896 | return 0; | 887 | if (ret) |
| 888 | return ret; | ||
| 897 | 889 | ||
| 898 | return fimc_is_enable_clocks(is); | 890 | return fimc_is_enable_clocks(is); |
| 899 | } | 891 | } |
| @@ -902,9 +894,7 @@ static int fimc_is_runtime_suspend(struct device *dev) | |||
| 902 | { | 894 | { |
| 903 | struct fimc_is *is = dev_get_drvdata(dev); | 895 | struct fimc_is *is = dev_get_drvdata(dev); |
| 904 | 896 | ||
| 905 | if (is->clk_init) | 897 | fimc_is_disable_clocks(is); |
| 906 | fimc_is_disable_clocks(is); | ||
| 907 | |||
| 908 | return 0; | 898 | return 0; |
| 909 | } | 899 | } |
| 910 | 900 | ||
diff --git a/drivers/media/platform/exynos4-is/fimc-is.h b/drivers/media/platform/exynos4-is/fimc-is.h index 606a7c9fe526..d7db133b493f 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.h +++ b/drivers/media/platform/exynos4-is/fimc-is.h | |||
| @@ -264,7 +264,6 @@ struct fimc_is { | |||
| 264 | spinlock_t slock; | 264 | spinlock_t slock; |
| 265 | 265 | ||
| 266 | struct clk *clocks[ISS_CLKS_MAX]; | 266 | struct clk *clocks[ISS_CLKS_MAX]; |
| 267 | bool clk_init; | ||
| 268 | void __iomem *regs; | 267 | void __iomem *regs; |
| 269 | void __iomem *pmu_regs; | 268 | void __iomem *pmu_regs; |
| 270 | int irq; | 269 | int irq; |
diff --git a/drivers/media/platform/s5p-jpeg/Makefile b/drivers/media/platform/s5p-jpeg/Makefile index ddc2900d88a2..d18cb5edd2d5 100644 --- a/drivers/media/platform/s5p-jpeg/Makefile +++ b/drivers/media/platform/s5p-jpeg/Makefile | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | s5p-jpeg-objs := jpeg-core.o | 1 | s5p-jpeg-objs := jpeg-core.o |
| 2 | obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) := s5p-jpeg.o | 2 | obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) += s5p-jpeg.o |
diff --git a/drivers/media/platform/s5p-mfc/Makefile b/drivers/media/platform/s5p-mfc/Makefile index 379008c6d09a..15f59b324fef 100644 --- a/drivers/media/platform/s5p-mfc/Makefile +++ b/drivers/media/platform/s5p-mfc/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) := s5p-mfc.o | 1 | obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc.o |
| 2 | s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o | 2 | s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o |
| 3 | s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o | 3 | s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o |
| 4 | s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o | 4 | s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o |
diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig index f6768cad001a..15665debc572 100644 --- a/drivers/media/tuners/Kconfig +++ b/drivers/media/tuners/Kconfig | |||
| @@ -1,23 +1,3 @@ | |||
| 1 | config MEDIA_ATTACH | ||
| 2 | bool "Load and attach frontend and tuner driver modules as needed" | ||
| 3 | depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT | ||
| 4 | depends on MODULES | ||
| 5 | default y if !EXPERT | ||
| 6 | help | ||
| 7 | Remove the static dependency of DVB card drivers on all | ||
| 8 | frontend modules for all possible card variants. Instead, | ||
| 9 | allow the card drivers to only load the frontend modules | ||
| 10 | they require. | ||
| 11 | |||
| 12 | Also, tuner module will automatically load a tuner driver | ||
| 13 | when needed, for analog mode. | ||
| 14 | |||
| 15 | This saves several KBytes of memory. | ||
| 16 | |||
| 17 | Note: You will need module-init-tools v3.2 or later for this feature. | ||
| 18 | |||
| 19 | If unsure say Y. | ||
| 20 | |||
| 21 | # Analog TV tuners, auto-loaded via tuner.ko | 1 | # Analog TV tuners, auto-loaded via tuner.ko |
| 22 | config MEDIA_TUNER | 2 | config MEDIA_TUNER |
| 23 | tristate | 3 | tristate |
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index 22015fe1a0f3..2cc8ec70e3b6 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |||
| @@ -376,7 +376,7 @@ static int rtl2832u_read_config(struct dvb_usb_device *d) | |||
| 376 | struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf}; | 376 | struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf}; |
| 377 | struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf}; | 377 | struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf}; |
| 378 | struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf}; | 378 | struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf}; |
| 379 | struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 5, buf}; | 379 | struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 1, buf}; |
| 380 | 380 | ||
| 381 | dev_dbg(&d->udev->dev, "%s:\n", __func__); | 381 | dev_dbg(&d->udev->dev, "%s:\n", __func__); |
| 382 | 382 | ||
| @@ -481,9 +481,9 @@ static int rtl2832u_read_config(struct dvb_usb_device *d) | |||
| 481 | goto found; | 481 | goto found; |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | /* check R820T by reading tuner stats at I2C addr 0x1a */ | 484 | /* check R820T ID register; reg=00 val=69 */ |
| 485 | ret = rtl28xxu_ctrl_msg(d, &req_r820t); | 485 | ret = rtl28xxu_ctrl_msg(d, &req_r820t); |
| 486 | if (ret == 0) { | 486 | if (ret == 0 && buf[0] == 0x69) { |
| 487 | priv->tuner = TUNER_RTL2832_R820T; | 487 | priv->tuner = TUNER_RTL2832_R820T; |
| 488 | priv->tuner_name = "R820T"; | 488 | priv->tuner_name = "R820T"; |
| 489 | goto found; | 489 | goto found; |
