From caff80c35f923806b7e5ef312dce41663b5e99b9 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Tue, 20 Nov 2012 07:30:36 -0300 Subject: [media] davinci: vpbe: pass different platform names to handle different ip's The vpbe driver can handle different platforms DM644X, DM36X and DM355. To differentiate between this platforms venc_type/vpbe_type was passed as part of platform data which was incorrect. The correct way to differentiate to handle this case is by passing different platform names. This patch creates platform_device_id[] array supporting different platforms and assigns id_table to the platform driver, and finally in the probe gets the actual device by using platform_get_device_id() and gets the appropriate driver data for that platform. Taking this approach will also make the DT transition easier. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Acked-by: Sekhar Nori Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-davinci/board-dm644x-evm.c | 8 ++++---- arch/arm/mach-davinci/dm644x.c | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f22572ce..b00ade4 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -689,7 +689,7 @@ static struct vpbe_output dm644xevm_vpbe_outputs[] = { .std = VENC_STD_ALL, .capabilities = V4L2_OUT_CAP_STD, }, - .subdev_name = VPBE_VENC_SUBDEV_NAME, + .subdev_name = DM644X_VPBE_VENC_SUBDEV_NAME, .default_mode = "ntsc", .num_modes = ARRAY_SIZE(dm644xevm_enc_std_timing), .modes = dm644xevm_enc_std_timing, @@ -701,7 +701,7 @@ static struct vpbe_output dm644xevm_vpbe_outputs[] = { .type = V4L2_OUTPUT_TYPE_ANALOG, .capabilities = V4L2_OUT_CAP_DV_TIMINGS, }, - .subdev_name = VPBE_VENC_SUBDEV_NAME, + .subdev_name = DM644X_VPBE_VENC_SUBDEV_NAME, .default_mode = "480p59_94", .num_modes = ARRAY_SIZE(dm644xevm_enc_preset_timing), .modes = dm644xevm_enc_preset_timing, @@ -712,10 +712,10 @@ static struct vpbe_config dm644xevm_display_cfg = { .module_name = "dm644x-vpbe-display", .i2c_adapter_id = 1, .osd = { - .module_name = VPBE_OSD_SUBDEV_NAME, + .module_name = DM644X_VPBE_OSD_SUBDEV_NAME, }, .venc = { - .module_name = VPBE_VENC_SUBDEV_NAME, + .module_name = DM644X_VPBE_VENC_SUBDEV_NAME, }, .num_outputs = ARRAY_SIZE(dm644xevm_vpbe_outputs), .outputs = dm644xevm_vpbe_outputs, diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 14e9947..0849d57 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -669,19 +669,14 @@ static struct resource dm644x_osd_resources[] = { }, }; -static struct osd_platform_data dm644x_osd_data = { - .vpbe_type = VPBE_VERSION_1, -}; - static struct platform_device dm644x_osd_dev = { - .name = VPBE_OSD_SUBDEV_NAME, + .name = DM644X_VPBE_OSD_SUBDEV_NAME, .id = -1, .num_resources = ARRAY_SIZE(dm644x_osd_resources), .resource = dm644x_osd_resources, .dev = { .dma_mask = &dm644x_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), - .platform_data = &dm644x_osd_data, }, }; @@ -751,12 +746,11 @@ static struct platform_device dm644x_vpbe_display = { }; static struct venc_platform_data dm644x_venc_pdata = { - .venc_type = VPBE_VERSION_1, .setup_clock = dm644x_venc_setup_clock, }; static struct platform_device dm644x_venc_dev = { - .name = VPBE_VENC_SUBDEV_NAME, + .name = DM644X_VPBE_VENC_SUBDEV_NAME, .id = -1, .num_resources = ARRAY_SIZE(dm644x_venc_resources), .resource = dm644x_venc_resources, -- cgit v1.1 From 56bc911ac3b94c731db3a6de20258827f1a61c20 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Fri, 1 Feb 2013 15:00:40 -0300 Subject: [media] s5p-fimc: Redefine platform data structure for fimc-is Newer Exynos4 SoC are equipped with a local camera ISP that controls external raw image sensor directly. Such sensors can be connected through FIMC-LITEn (and MIPI-CSISn) IPs to the ISP, which then feeds image data to the FIMCn IP. Thus there can be two busses associated with an image source (sensor). Rename struct s5p_fimc_isp_info describing external image sensor (video decoder) to struct fimc_source_info to avoid confusion. bus_type is split into fimc_bus_type and sensor_bus_type. The bus type enumeration is extended to include both FIMC Writeback input types. The bus_type enumeration and the data structure name in the board files are modified according to the above changes. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Acked-by: Kukjin Kim Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-exynos/mach-nuri.c | 8 ++++---- arch/arm/mach-exynos/mach-universal_c210.c | 8 ++++---- arch/arm/mach-s5pv210/mach-goni.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 27d4ed8..7c2600e 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -1209,25 +1209,25 @@ static struct i2c_board_info m5mols_board_info = { .platform_data = &m5mols_platdata, }; -static struct s5p_fimc_isp_info nuri_camera_sensors[] = { +static struct fimc_source_info nuri_camera_sensors[] = { { .flags = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_VSYNC_ACTIVE_LOW, - .bus_type = FIMC_ITU_601, + .fimc_bus_type = FIMC_BUS_TYPE_ITU_601, .board_info = &s5k6aa_board_info, .clk_frequency = 24000000UL, .i2c_bus_num = 6, }, { .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | V4L2_MBUS_VSYNC_ACTIVE_LOW, - .bus_type = FIMC_MIPI_CSI2, + .fimc_bus_type = FIMC_BUS_TYPE_MIPI_CSI2, .board_info = &m5mols_board_info, .clk_frequency = 24000000UL, }, }; static struct s5p_platform_fimc fimc_md_platdata = { - .isp_info = nuri_camera_sensors, + .source_info = nuri_camera_sensors, .num_clients = ARRAY_SIZE(nuri_camera_sensors), }; diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 9e3340f..c09290a 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -988,12 +988,12 @@ static struct i2c_board_info m5mols_board_info = { .platform_data = &m5mols_platdata, }; -static struct s5p_fimc_isp_info universal_camera_sensors[] = { +static struct fimc_source_info universal_camera_sensors[] = { { .mux_id = 0, .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | V4L2_MBUS_VSYNC_ACTIVE_LOW, - .bus_type = FIMC_ITU_601, + .fimc_bus_type = FIMC_BUS_TYPE_ITU_601, .board_info = &s5k6aa_board_info, .i2c_bus_num = 0, .clk_frequency = 24000000UL, @@ -1001,7 +1001,7 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { .mux_id = 0, .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | V4L2_MBUS_VSYNC_ACTIVE_LOW, - .bus_type = FIMC_MIPI_CSI2, + .fimc_bus_type = FIMC_BUS_TYPE_MIPI_CSI2, .board_info = &m5mols_board_info, .i2c_bus_num = 0, .clk_frequency = 24000000UL, @@ -1009,7 +1009,7 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { }; static struct s5p_platform_fimc fimc_md_platdata = { - .isp_info = universal_camera_sensors, + .source_info = universal_camera_sensors, .num_clients = ARRAY_SIZE(universal_camera_sensors), }; diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index c72b310..423f6b6 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c @@ -841,12 +841,12 @@ static struct i2c_board_info noon010pc30_board_info = { .platform_data = &noon010pc30_pldata, }; -static struct s5p_fimc_isp_info goni_camera_sensors[] = { +static struct fimc_source_info goni_camera_sensors[] = { { .mux_id = 0, .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | V4L2_MBUS_VSYNC_ACTIVE_LOW, - .bus_type = FIMC_ITU_601, + .bus_type = FIMC_BUS_TYPE_ITU_601, .board_info = &noon010pc30_board_info, .i2c_bus_num = 0, .clk_frequency = 16000000UL, @@ -854,7 +854,7 @@ static struct s5p_fimc_isp_info goni_camera_sensors[] = { }; static struct s5p_platform_fimc goni_fimc_md_platdata __initdata = { - .isp_info = goni_camera_sensors, + .source_info = goni_camera_sensors, .num_clients = ARRAY_SIZE(goni_camera_sensors), }; -- cgit v1.1 From 3e85a44aacd68744765f2fc7f0645645b34e64f8 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Tue, 15 Jan 2013 05:04:41 -0300 Subject: [media] ARM: davinci: da850 evm: pass platform data for adv7343 encoder Without this patch the adv7343 encoder was being set to default configuration which caused display not to work on this board. This patch passes the necessary platform data required for adv7343 encoder to work on da850 evm. Signed-off-by: Lad, Prabhakar Acked-by: Sekhar Nori Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-davinci/board-da850-evm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 0299915..d0e3ec3 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1256,11 +1256,24 @@ static struct vpif_capture_config da850_vpif_capture_config = { }; /* VPIF display configuration */ + +static struct adv7343_platform_data adv7343_pdata = { + .mode_config = { + .dac_3 = 1, + .dac_2 = 1, + .dac_1 = 1, + }, + .sd_config = { + .sd_dac_out1 = 1, + }, +}; + static struct vpif_subdev_info da850_vpif_subdev[] = { { .name = "adv7343", .board_info = { I2C_BOARD_INFO("adv7343", 0x2a), + .platform_data = &adv7343_pdata, }, }, }; -- cgit v1.1