예제 #1
0
static void acx_panel_power_off(struct omap_dss_device *dssdev)
{
	struct acx565akm_device *md = &acx_dev;

	dev_dbg(&dssdev->dev, "%s\n", __func__);

	mutex_lock(&md->mutex);

	if (!md->enabled) {
		mutex_unlock(&md->mutex);
		return;
	}
	set_display_state(md, 0);
	set_sleep_mode(md, 1);
	md->enabled = 0;
	/*
	 * We have to provide PCLK,HS,VS signals for 2 frames (worst case
	 * ~50msec) after sending the sleep in command and asserting the
	 * reset signal. We probably could assert the reset w/o the delay
	 * but we still delay to avoid possible artifacts. (7.6.1)
	 */
	msleep(50);

	if (dssdev->platform_disable)
		dssdev->platform_disable(dssdev);

	/* FIXME need to tweak this delay */
	msleep(100);

	omapdss_sdi_display_disable(dssdev);

	mutex_unlock(&md->mutex);
}
static int acx_panel_power_on(struct omap_dss_device *dssdev)
{
	struct acx565akm_device *md = &acx_dev;
	int r;

	dev_dbg(&dssdev->dev, "%s\n", __func__);

	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
		return 0;

	mutex_lock(&md->mutex);

	r = omapdss_sdi_display_enable(dssdev);
	if (r) {
		pr_err("%s sdi enable failed\n", __func__);
		goto fail_unlock;
	}

	/*               */
	msleep(50);

	if (dssdev->platform_enable) {
		r = dssdev->platform_enable(dssdev);
		if (r)
			goto fail;
	}

	if (md->enabled) {
		dev_dbg(&md->spi->dev, "panel already enabled\n");
		mutex_unlock(&md->mutex);
		return 0;
	}

	/*
                                                         
                                             
                                            
                                                                
                   
                                                    
  */
	msleep(120);

	set_sleep_mode(md, 0);
	md->enabled = 1;

	/*                                                        */
	msleep(5);
	set_display_state(md, 1);
	set_cabc_mode(md, md->cabc_mode);

	mutex_unlock(&md->mutex);

	return acx565akm_bl_update_status(md->bl_dev);
fail:
	omapdss_sdi_display_disable(dssdev);
fail_unlock:
	mutex_unlock(&md->mutex);
	return r;
}
예제 #3
0
static int acx_panel_power_on(struct omap_dss_device *dssdev)
{
	struct acx565akm_device *md = &acx_dev;
	int r;

	dev_dbg(&dssdev->dev, "%s\n", __func__);

	mutex_lock(&md->mutex);

	r = omapdss_sdi_display_enable(dssdev);
	if (r) {
		pr_err("%s sdi enable failed\n", __func__);
		return r;
	}

	/*FIXME tweak me */
	msleep(50);

	if (dssdev->platform_enable) {
		r = dssdev->platform_enable(dssdev);
		if (r)
			goto fail;
	}

	if (md->enabled) {
		dev_dbg(&md->spi->dev, "panel already enabled\n");
		mutex_unlock(&md->mutex);
		return 0;
	}

	/*
	 * We have to meet all the following delay requirements:
	 * 1. tRW: reset pulse width 10usec (7.12.1)
	 * 2. tRT: reset cancel time 5msec (7.12.1)
	 * 3. Providing PCLK,HS,VS signals for 2 frames = ~50msec worst
	 *    case (7.6.2)
	 * 4. 120msec before the sleep out command (7.12.1)
	 */
	msleep(120);

	set_sleep_mode(md, 0);
	md->enabled = 1;

	/* 5msec between sleep out and the next command. (8.2.16) */
	msleep(5);
	set_display_state(md, 1);
	set_cabc_mode(md, md->cabc_mode);

	mutex_unlock(&md->mutex);

	return acx565akm_bl_update_status(md->bl_dev);
fail:
	omapdss_sdi_display_disable(dssdev);
	return r;
}
예제 #4
0
static void acx_panel_set_timings(struct omap_dss_device *dssdev,
		struct omap_video_timings *timings)
{
	int r;

	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
		omapdss_sdi_display_disable(dssdev);

	dssdev->panel.timings = *timings;

	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
		r = omapdss_sdi_display_enable(dssdev);
		if (r)
			dev_err(&dssdev->dev, "%s enable failed\n", __func__);
	}
}
static void acx_panel_power_off(struct omap_dss_device *dssdev)
{
	struct acx565akm_device *md = &acx_dev;

	dev_dbg(&dssdev->dev, "%s\n", __func__);

	if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
		return;

	mutex_lock(&md->mutex);

	if (!md->enabled) {
		mutex_unlock(&md->mutex);
		return;
	}
	set_display_state(md, 0);
	set_sleep_mode(md, 1);
	md->enabled = 0;
	/*
                                                                  
                                                                 
                                                                  
                                                           
  */
	msleep(50);

	if (dssdev->platform_disable)
		dssdev->platform_disable(dssdev);

	/*                                */
	msleep(100);

	omapdss_sdi_display_disable(dssdev);

	mutex_unlock(&md->mutex);
}