Ejemplo n.º 1
0
Archivo: csis.c Proyecto: SelfImp/m9
void s3c_csis_start(int lanes, int settle, int align, int width,
		int height, int pixel_format)
{
	struct platform_device *pdev = to_platform_device(s3c_csis->dev);
	struct s3c_platform_csis *pdata;

	/* clock & power on */
	s3c_csis_clk_on(pdev);
	pdata = to_csis_plat(s3c_csis->dev);
	if (pdata->cfg_phy_global)
		pdata->cfg_phy_global(pdev, 1);

	s3c_csis_reset();
	s3c_csis_set_nr_lanes(lanes);

#ifdef CONFIG_MIPI_CSI_ADV_FEATURE
	/* FIXME: how configure the followings with FIMC dynamically? */
	s3c_csis_set_hs_settle(settle);	/* s5k6aa */
	s3c_csis_set_data_align(align);
	s3c_csis_set_wclk(0);
	if (pixel_format == V4L2_PIX_FMT_JPEG)
		s3c_csis_set_format(MIPI_USER_DEF_PACKET_1);
	else
		s3c_csis_set_format(MIPI_CSI_YCBCR422_8BIT);
	s3c_csis_set_resol(width, height);
	s3c_csis_update_shadow();
#endif

	s3c_csis_enable_interrupt();
	s3c_csis_system_on();
	s3c_csis_phy_on();

	info("Samsung MIPI-CSI2 operation started\n");
}
Ejemplo n.º 2
0
void s3c_csis_start(int csis_id, int lanes, int settle, int align, int width, \
				int height, int pixel_format)
{
	struct platform_device *pdev = NULL;
	struct s3c_platform_csis *pdata = NULL;
	int i;

	printk(KERN_INFO "csis width = %d, height = %d\n", width, height);

	memset(&s3c_csis[csis_id]->bufs, 0, sizeof(s3c_csis[csis_id]->bufs));

	/* clock & power on */
	pdev = to_platform_device(s3c_csis[csis_id]->dev);
	pdata = to_csis_plat(&pdev->dev);

	if (pdata->clk_on)
		pdata->clk_on(to_platform_device(s3c_csis[csis_id]->dev),
			&s3c_csis[csis_id]->clock);
	if (pdata->cfg_phy_global)
		pdata->cfg_phy_global(1);

	s3c_csis_reset(pdev);
	s3c_csis_set_nr_lanes(pdev, lanes);

#ifdef CONFIG_MIPI_CSI_ADV_FEATURE
	/* FIXME: how configure the followings with FIMC dynamically? */
	s3c_csis_set_hs_settle(pdev, settle);	/* s5k6aa */
	s3c_csis_set_data_align(pdev, align);
	s3c_csis_set_wclk(pdev, 1);
	if (pixel_format == V4L2_PIX_FMT_JPEG ||
		pixel_format == V4L2_PIX_FMT_INTERLEAVED) {
			printk(KERN_INFO "%s V4L2_PIX_FMT_JPEG or INTERLEAVED\n", __func__);
		s3c_csis_set_format(pdev, MIPI_USER_DEF_PACKET_1);
	} else if (pixel_format == V4L2_PIX_FMT_SGRBG10)
		s3c_csis_set_format(pdev, MIPI_CSI_RAW10);
	else
		s3c_csis_set_format(pdev, MIPI_CSI_YCBCR422_8BIT);
	s3c_csis_set_resol(pdev, width, height);
	s3c_csis_update_shadow(pdev);
#endif

	s3c_csis_enable_interrupt(pdev);
	s3c_csis_system_on(pdev);
	s3c_csis_phy_on(pdev);

	err_print_cnt = 0;
	info("Samsung MIPI-CSIS%d operation started\n", pdev->id);
}
Ejemplo n.º 3
0
///#endif
void s3c_csis_start(int csis_id, int lanes, int settle, int align, int width, \
                    int height, int pixel_format)
{
    struct platform_device *pdev = NULL;
    struct s3c_platform_csis *pdata = NULL;

    /* clock & power on */
    pdev = to_platform_device(s3c_csis[csis_id]->dev);
    pdata = to_csis_plat(&pdev->dev);

    if (pdata->clk_on)
        pdata->clk_on(to_platform_device(s3c_csis[csis_id]->dev),
                      &s3c_csis[csis_id]->clock);
    if (pdata->cfg_phy_global)
        pdata->cfg_phy_global(1);

    s3c_csis_reset(pdev);
    s3c_csis_set_nr_lanes(pdev, lanes);

#ifdef CONFIG_MIPI_CSI_ADV_FEATURE
    /* FIXME: how configure the followings with FIMC dynamically? */
    s3c_csis_set_hs_settle(pdev, settle);	/* s5k6aa */
    s3c_csis_set_data_align(pdev, align);
    s3c_csis_set_wclk(pdev, 1);
    if (pixel_format == V4L2_PIX_FMT_JPEG)
        s3c_csis_set_format(pdev, MIPI_USER_DEF_PACKET_1);
    else if (pixel_format == V4L2_PIX_FMT_SGRBG10)
        s3c_csis_set_format(pdev, MIPI_CSI_RAW10);
    else
        s3c_csis_set_format(pdev, MIPI_CSI_YCBCR422_8BIT);
    s3c_csis_set_resol(pdev, width, height);
    s3c_csis_update_shadow(pdev);
#endif

    s3c_csis_enable_interrupt(pdev);
    s3c_csis_system_on(pdev);
    s3c_csis_phy_on(pdev);

    err_print_cnt = 0;
///#ifdef CONFIG_VIDEO_S5K4ECGX
    mipi_start = 1;//zxz 2012-3-21 temp for 5m sensor
///#endif
    info("++Samsung MIPI-CSIS%d operation started\n", pdev->id);
}