Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 998c336d authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAPDSS: remove omap_dss_device's suspend/resume



The panel drivers contain enable, disable, suspend and resume calls.
The suspend and resume are effectively identical to disable and enable.

This patch removes panel suspend and enable code from omapdss and the
panel drivers, and replaces their use with enable and disable.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent b1112249
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -710,27 +710,6 @@ static void acx_panel_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static int acx_panel_suspend(struct omap_dss_device *dssdev)
{
	dev_dbg(&dssdev->dev, "%s\n", __func__);
	acx_panel_power_off(dssdev);
	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
	return 0;
}

static int acx_panel_resume(struct omap_dss_device *dssdev)
{
	int r;

	dev_dbg(&dssdev->dev, "%s\n", __func__);
	r = acx_panel_power_on(dssdev);
	if (r)
		return r;

	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
	return 0;
}

static void acx_panel_set_timings(struct omap_dss_device *dssdev,
		struct omap_video_timings *timings)
{
@@ -752,8 +731,6 @@ static struct omap_dss_driver acx_panel_driver = {

	.enable		= acx_panel_enable,
	.disable	= acx_panel_disable,
	.suspend	= acx_panel_suspend,
	.resume		= acx_panel_resume,

	.set_timings	= acx_panel_set_timings,
	.check_timings	= acx_panel_check_timings,
+0 −36
Original line number Diff line number Diff line
@@ -688,40 +688,6 @@ static void generic_dpi_panel_disable(struct omap_dss_device *dssdev)
	mutex_unlock(&drv_data->lock);
}

static int generic_dpi_panel_suspend(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);

	mutex_lock(&drv_data->lock);

	generic_dpi_panel_power_off(dssdev);

	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

	mutex_unlock(&drv_data->lock);

	return 0;
}

static int generic_dpi_panel_resume(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);
	int r;

	mutex_lock(&drv_data->lock);

	r = generic_dpi_panel_power_on(dssdev);
	if (r)
		goto err;

	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

err:
	mutex_unlock(&drv_data->lock);

	return r;
}

static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev,
		struct omap_video_timings *timings)
{
@@ -769,8 +735,6 @@ static struct omap_dss_driver dpi_driver = {

	.enable		= generic_dpi_panel_enable,
	.disable	= generic_dpi_panel_disable,
	.suspend	= generic_dpi_panel_suspend,
	.resume		= generic_dpi_panel_resume,

	.set_timings	= generic_dpi_panel_set_timings,
	.get_timings	= generic_dpi_panel_get_timings,
+0 −34
Original line number Diff line number Diff line
@@ -143,46 +143,12 @@ static void lb035q02_panel_disable(struct omap_dss_device *dssdev)
	mutex_unlock(&ld->lock);
}

static int lb035q02_panel_suspend(struct omap_dss_device *dssdev)
{
	struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev);

	mutex_lock(&ld->lock);

	lb035q02_panel_power_off(dssdev);
	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

	mutex_unlock(&ld->lock);
	return 0;
}

static int lb035q02_panel_resume(struct omap_dss_device *dssdev)
{
	struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev);
	int r;

	mutex_lock(&ld->lock);

	r = lb035q02_panel_power_on(dssdev);
	if (r)
		goto err;
	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

	mutex_unlock(&ld->lock);
	return 0;
err:
	mutex_unlock(&ld->lock);
	return r;
}

static struct omap_dss_driver lb035q02_driver = {
	.probe		= lb035q02_panel_probe,
	.remove		= lb035q02_panel_remove,

	.enable		= lb035q02_panel_enable,
	.disable	= lb035q02_panel_disable,
	.suspend	= lb035q02_panel_suspend,
	.resume		= lb035q02_panel_resume,

	.driver         = {
		.name   = "lgphilips_lb035q02_panel",
+0 −50
Original line number Diff line number Diff line
@@ -574,54 +574,6 @@ static void n8x0_panel_disable(struct omap_dss_device *dssdev)
	mutex_unlock(&ddata->lock);
}

static int n8x0_panel_suspend(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *ddata = get_drv_data(dssdev);

	dev_dbg(&dssdev->dev, "suspend\n");

	mutex_lock(&ddata->lock);

	rfbi_bus_lock();

	n8x0_panel_power_off(dssdev);

	rfbi_bus_unlock();

	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

	mutex_unlock(&ddata->lock);

	return 0;
}

static int n8x0_panel_resume(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *ddata = get_drv_data(dssdev);
	int r;

	dev_dbg(&dssdev->dev, "resume\n");

	mutex_lock(&ddata->lock);

	rfbi_bus_lock();

	r = n8x0_panel_power_on(dssdev);

	rfbi_bus_unlock();

	if (r) {
		mutex_unlock(&ddata->lock);
		return r;
	}

	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

	mutex_unlock(&ddata->lock);

	return 0;
}

static void n8x0_panel_get_resolution(struct omap_dss_device *dssdev,
		u16 *xres, u16 *yres)
{
@@ -683,8 +635,6 @@ static struct omap_dss_driver n8x0_panel_driver = {

	.enable		= n8x0_panel_enable,
	.disable	= n8x0_panel_disable,
	.suspend	= n8x0_panel_suspend,
	.resume		= n8x0_panel_resume,

	.update		= n8x0_panel_update,
	.sync		= n8x0_panel_sync,
+0 −24
Original line number Diff line number Diff line
@@ -236,28 +236,6 @@ static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static int nec_8048_panel_suspend(struct omap_dss_device *dssdev)
{
	nec_8048_panel_power_off(dssdev);

	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

	return 0;
}

static int nec_8048_panel_resume(struct omap_dss_device *dssdev)
{
	int r;

	r = nec_8048_panel_power_on(dssdev);
	if (r)
		return r;

	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

	return 0;
}

static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev)
{
	return 16;
@@ -268,8 +246,6 @@ static struct omap_dss_driver nec_8048_driver = {
	.remove			= nec_8048_panel_remove,
	.enable			= nec_8048_panel_enable,
	.disable		= nec_8048_panel_disable,
	.suspend		= nec_8048_panel_suspend,
	.resume			= nec_8048_panel_resume,
	.get_recommended_bpp	= nec_8048_recommended_bpp,

	.driver		= {
Loading