Register the tvp514x decoder devices directly in board platform data instead of letting the vpif capture driver register them at their run-time. This uses the V4L2 asynchronous subdevice probing capability. Signed-off-by: Lad, Prabhakar <prabhakar.lad@xxxxxx> Cc: Sekhar Nori <nsekhar@xxxxxx> --- arch/arm/mach-davinci/board-da850-evm.c | 57 +++++++++++++++++++++++++++---- 1 files changed, 50 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 0299915..089c127 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -49,6 +49,7 @@ #include <media/tvp514x.h> #include <media/adv7343.h> +#include <media/v4l2-async.h> #define DA850_EVM_PHY_ID "davinci_mdio-0:00" #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) @@ -732,6 +733,12 @@ static struct pca953x_platform_data da850_evm_bb_expander_info = { .names = da850_evm_bb_exp, }; +static struct tvp514x_platform_data tvp5146_pdata = { + .clk_polarity = 0, + .hs_polarity = 1, + .vs_polarity = 1, +}; + static struct i2c_board_info __initdata da850_evm_i2c_devices[] = { { I2C_BOARD_INFO("tlv320aic3x", 0x18), @@ -744,6 +751,14 @@ static struct i2c_board_info __initdata da850_evm_i2c_devices[] = { I2C_BOARD_INFO("tca6416", 0x21), .platform_data = &da850_evm_bb_expander_info, }, + { + I2C_BOARD_INFO("tvp5146", 0x5c), + .platform_data = &tvp5146_pdata, + }, { + I2C_BOARD_INFO("tvp5146", 0x5d), + .platform_data = &tvp5146_pdata, + }, + }; static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { @@ -1170,15 +1185,10 @@ static __init int da850_evm_init_cpufreq(void) { return 0; } #if defined(CONFIG_DA850_UI_SD_VIDEO_PORT) -#define TVP5147_CH0 "tvp514x-0" -#define TVP5147_CH1 "tvp514x-1" +#define TVP5147_CH0 "tvp514x 1-005d" +#define TVP5147_CH1 "tvp514x 1-005c" /* VPIF capture configuration */ -static struct tvp514x_platform_data tvp5146_pdata = { - .clk_polarity = 0, - .hs_polarity = 1, - .vs_polarity = 1, -}; #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) @@ -1229,6 +1239,37 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { }, }; +static struct v4l2_async_subdev tvp1_sd = { + .hw = { + .bus_type = V4L2_ASYNC_BUS_I2C, + .match.i2c = { + .adapter_id = 1, + .address = 0x5c, + }, + }, +}; + +static struct v4l2_async_subdev tvp2_sd = { + .hw = { + .bus_type = V4L2_ASYNC_BUS_I2C, + .match.i2c = { + .adapter_id = 1, + .address = 0x5d, + }, + }, +}; + +static struct v4l2_async_subdev *vpif_capture_async_subdevs[] = { + /* Single 2-element group */ + &tvp1_sd, + &tvp2_sd, +}; + +static int vpif_capture_async_subdev_sizes[] = { + ARRAY_SIZE(vpif_capture_async_subdevs), + 0, +}; + static struct vpif_capture_config da850_vpif_capture_config = { .subdev_info = da850_vpif_capture_sdev_info, .subdev_count = ARRAY_SIZE(da850_vpif_capture_sdev_info), @@ -1253,6 +1294,8 @@ static struct vpif_capture_config da850_vpif_capture_config = { }, }, .card_name = "DA850/OMAP-L138 Video Capture", + .asd = vpif_capture_async_subdevs, + .asd_sizes = vpif_capture_async_subdev_sizes, }; /* VPIF display configuration */ -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html