static int __init omap3_beagle_late_initcall(void)
{
	if (!machine_is_omap3_beagle())
		return 0;

	if (!cpu_is_omap3630())
		return 0;

#if defined(CONFIG_VIDEO_MT9P031)
	if ((!strcmp(camera_name, "lbcm5m1")) || (!strcmp(camera_name, "li5m03")))
	{
		pr_info("Beagle camera: MT9P031 init\n");

		reg_1v8 = regulator_get(NULL, "cam_1v8");
		if (IS_ERR(reg_1v8))
			pr_err("%s: cannot get cam_1v8 regulator\n", __func__);
		else
			regulator_enable(reg_1v8);

		reg_2v8 = regulator_get(NULL, "cam_2v8");
		if (IS_ERR(reg_2v8))
			pr_err("%s: cannot get cam_2v8 regulator\n", __func__);
		else
			regulator_enable(reg_2v8);

		omap3_init_camera(&beagle_isp_platform_data);
	}
#endif
	return 0;
}
static int __init beagle_cam_init(void)
{
	/*
	 * Regulator supply required for camera interface
	 */
	beagle_1v8 = regulator_get(NULL, "cam_1v8");
	if (IS_ERR(beagle_1v8)) {
		printk(KERN_ERR "cam_1v8 regulator missing\n");
		return PTR_ERR(beagle_1v8);
	}
	beagle_2v8 = regulator_get(NULL, "cam_2v8");
	if (IS_ERR(beagle_2v8)) {
		printk(KERN_ERR "cam_2v8 regulator missing\n");
		regulator_put(beagle_1v8);
		return PTR_ERR(beagle_2v8);
	}
	/*
	 * Sensor reset GPIO
	 */
	if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) {
		printk(KERN_ERR "beagle-cam: Could not request GPIO %d\n",
				LEOPARD_RESET_GPIO);
		regulator_put(beagle_1v8);
		regulator_put(beagle_2v8);
		return -ENODEV;
	}
	/* set to output mode */
	gpio_direction_output(LEOPARD_RESET_GPIO, 0);

	omap3_init_camera(&beagle_isp_platform_data);

	return 0;
}
Example #3
0
void __init mykonos2_cameras_init(void)
{
	omap_mykonos2_cam_init();

	if (omap3_init_camera(&m2_isp_platform_data) < 0)
		printk(KERN_WARNING
		       "%s: unable to register isp platform device\n",
		       __func__);

}
void __init fc6100_camera_init(void)
{

	pr_info("FC6100: Camera init\n");

	/* Initial state: */
	gpio_set_value(FC_CAM_EN_N, 1); /* CAM_EN is inverted on Mezz HW04 */
	mdelay (200);

	/* Power On Sequence */
	gpio_set_value(FC_CAM_EN_N, 0);
	mdelay (20); /* t1 (cf. TVP5151 spec. p24) */


if (omap3_init_camera(&isp_pdata) < 0)
		pr_warning("FC6100: Unable to register camera platform \n");

	pr_info("FC6100: Camera init done successfully \n");
}
Example #5
0
static int __init overo_camera_init(void)
{
       return omap3_init_camera(&overo_isp_platform_data);
}
static int __init beagle_camera_init(void)
{
	if (!machine_is_omap3_beagle() || !cpu_is_omap3630())
		return 0;

	reg_1v8 = regulator_get(NULL, "cam_1v8");
	if (IS_ERR(reg_1v8))
		pr_err("%s: cannot get cam_1v8 regulator\n", __func__);
	else
		regulator_enable(reg_1v8);

	reg_2v8 = regulator_get(NULL, "cam_2v8");
	if (IS_ERR(reg_2v8))
		pr_err("%s: cannot get cam_2v8 regulator\n", __func__);
	else
		regulator_enable(reg_2v8);

	omap_register_i2c_bus(2, 100, NULL, 0);
#ifdef CONFIG_VIDEO_AP0100
        gpio_request(AP0100_RESET_GPIO, "cam_rst");
        gpio_direction_output(AP0100_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_AR0130
        gpio_request(AR0130_RESET_GPIO, "cam_rst");
        gpio_direction_output(AR0130_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9D131
	gpio_request(MT9D131_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9D131_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9P006
	gpio_request(MT9P006_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9P006_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9P017
	gpio_request(MT9P017_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9P017_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9P031
	gpio_request(MT9P031_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9P031_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9P111
	gpio_request(MT9P111_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9P111_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9T111
	gpio_request(MT9T111_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9T111_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9V032
	gpio_request(MT9V032_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9V032_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9V034
	gpio_request(MT9V034_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9V034_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9V128
	gpio_request(MT9V128_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9V128_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9V113
	gpio_request(MT9V113_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9V113_RESET_GPIO, 0);
#endif
#ifdef CONFIG_VIDEO_MT9M021
	gpio_request(MT9M021_RESET_GPIO, "cam_rst");
	gpio_direction_output(MT9M021_RESET_GPIO, 0);
#endif

	omap3_init_camera(&beagle_isp_platform_data); //Enable >1 Aptina driver
	return 0;
}
Example #7
0
static void __init cm_t35_init_camera(void)
{
	if (omap3_init_camera(&cm_t35_isp_pdata) < 0)
		pr_warn("CM-T3x: Failed registering camera device!\n");
}