/**
 * @brief omap3evmdc_init - module init function. Should be called before any
 *                          client driver init call
 *
 * @return result of operation - 0 is success
 */
int __init omap3evmdc_init(int is_onboard, int dec_i2c_bus, int dec_i2c_id)
{
	int err;

	/* Status of Video Decoder : On Board or DC */
	is_dec_onboard = is_onboard;

	err = omap3evmdc_mdc_config();
	if (err) {
		printk(KERN_ERR MODULE_NAME ": MDC configuration failed \n");
		return err;
	}

	/*
	 * Register the I2C devices present in the board to the I2C
	 * framework.
	 * If more I2C devices are added, then each device information should
	 * be registered with I2C using i2c_register_board_info().
	 */
#if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
	tvp5146_i2c_board_info.addr = dec_i2c_id;
	err = i2c_register_board_info(dec_i2c_bus,
					&tvp5146_i2c_board_info, 1);
	if (err) {
		printk(KERN_ERR MODULE_NAME \
				": TVP5146 I2C Board Registration failed \n");
		return err;
	}
#endif
	printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");

	return 0;
}
/**
 * @brief omap3evmdc_init - module init function. Should be called before any
 *                          client driver init call
 *
 * @return result of operation - 0 is success
 */
int __init omap3evmdc_init(void)
{
	int err;

	/* Status of Video Decoder : On Board or DC */
	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
		is_dec_onboard = TRUE;
	else
		is_dec_onboard = FALSE;

	err = omap3evmdc_mdc_config();
	if (err) {
		printk(KERN_ERR MODULE_NAME ": MDC configuration failed \n");
		return err;
	}

	/*
	 * Register the I2C devices present in the board to the I2C
	 * framework.
	 * If more I2C devices are added, then each device information should
	 * be registered with I2C using i2c_register_board_info().
	 */
#if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
		tvp5146_i2c_board_info.addr = 0x5C;
	else
		tvp5146_i2c_board_info.addr = 0x5D;

	err = i2c_register_board_info(TVP5146_I2C_BUSNUM,
					&tvp5146_i2c_board_info, 1);
	if (err) {
		printk(KERN_ERR MODULE_NAME \
				": TVP5146 I2C Board Registration failed \n");
		return err;
	}
#endif
	printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");

	return 0;
}