Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284977
b: refs/heads/master
c: d95c03f
h: refs/heads/master
i:
  284975: 95deea6
v: v3
  • Loading branch information
Archit Taneja authored and Tomi Valkeinen committed Jan 2, 2012
1 parent 9290bb1 commit 4063b05
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84309f16323b433045fba250f1e6bf8f26847ca5
refs/heads/master: d95c03f3fad265356920b7884fef6359d393ade8
61 changes: 52 additions & 9 deletions trunk/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,50 +163,93 @@ static void nec_8048_panel_remove(struct omap_dss_device *dssdev)
kfree(necd);
}

static int nec_8048_panel_enable(struct omap_dss_device *dssdev)
static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)
{
int r = 0;
int r;
struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
struct backlight_device *bl = necd->bl;

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

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;

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

r = nec_8048_bl_update_status(bl);
if (r < 0)
dev_err(&dssdev->dev, "failed to set lcd brightness\n");

r = omapdss_dpi_display_enable(dssdev);

return 0;
err1:
omapdss_dpi_display_disable(dssdev);
err0:
return r;
}

static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
static void nec_8048_panel_power_off(struct omap_dss_device *dssdev)
{
struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
struct backlight_device *bl = necd->bl;

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

bl->props.brightness = 0;
nec_8048_bl_update_status(bl);

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

omapdss_dpi_display_disable(dssdev);
}

static int nec_8048_panel_enable(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 void nec_8048_panel_disable(struct omap_dss_device *dssdev)
{
nec_8048_panel_power_off(dssdev);

dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static int nec_8048_panel_suspend(struct omap_dss_device *dssdev)
{
nec_8048_panel_disable(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)
{
return nec_8048_panel_enable(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)
Expand Down

0 comments on commit 4063b05

Please sign in to comment.