diff options
author | Archit Taneja <archit@ti.com> | 2013-02-13 14:50:21 +0530 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-03 15:19:45 +0300 |
commit | 14e6a0918ab3f54b7574141eeab649853a5ac931 (patch) | |
tree | 4394343efde4e61a6820237acfc9cd87f6084749 /drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | |
parent | 02b804893affd71856ab7148e8293ed78df287c4 (diff) | |
download | blackbird-op-linux-14e6a0918ab3f54b7574141eeab649853a5ac931.tar.gz blackbird-op-linux-14e6a0918ab3f54b7574141eeab649853a5ac931.zip |
OMAPDSS: NEC-nl8048hl11: remove platform backlight support
NEC-nl8048hl11 driver contains support to call platform backlight
functions. These are not used by any board, and can be removed.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c index c4e9c2b1b465..c197927b26e9 100644 --- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c @@ -19,7 +19,6 @@ #include <linux/module.h> #include <linux/delay.h> #include <linux/spi/spi.h> -#include <linux/backlight.h> #include <linux/fb.h> #include <video/omapdss.h> @@ -33,7 +32,6 @@ #define LCD_PIXEL_CLOCK 23800 struct nec_8048_data { - struct backlight_device *bl; }; static const struct { @@ -84,43 +82,9 @@ static struct omap_video_timings nec_8048_panel_timings = { .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE, }; -static int nec_8048_bl_update_status(struct backlight_device *bl) -{ - struct omap_dss_device *dssdev = dev_get_drvdata(&bl->dev); - int level; - - if (!dssdev->set_backlight) - return -EINVAL; - - if (bl->props.fb_blank == FB_BLANK_UNBLANK && - bl->props.power == FB_BLANK_UNBLANK) - level = bl->props.brightness; - else - level = 0; - - return dssdev->set_backlight(dssdev, level); -} - -static int nec_8048_bl_get_brightness(struct backlight_device *bl) -{ - if (bl->props.fb_blank == FB_BLANK_UNBLANK && - bl->props.power == FB_BLANK_UNBLANK) - return bl->props.brightness; - - return 0; -} - -static const struct backlight_ops nec_8048_bl_ops = { - .get_brightness = nec_8048_bl_get_brightness, - .update_status = nec_8048_bl_update_status, -}; - static int nec_8048_panel_probe(struct omap_dss_device *dssdev) { - struct backlight_device *bl; struct nec_8048_data *necd; - struct backlight_properties props; - int r; dssdev->panel.timings = nec_8048_panel_timings; @@ -130,38 +94,12 @@ static int nec_8048_panel_probe(struct omap_dss_device *dssdev) dev_set_drvdata(&dssdev->dev, necd); - memset(&props, 0, sizeof(struct backlight_properties)); - props.max_brightness = 255; - - bl = backlight_device_register("nec-8048", &dssdev->dev, dssdev, - &nec_8048_bl_ops, &props); - if (IS_ERR(bl)) { - r = PTR_ERR(bl); - kfree(necd); - return r; - } - necd->bl = bl; - - bl->props.fb_blank = FB_BLANK_UNBLANK; - bl->props.power = FB_BLANK_UNBLANK; - bl->props.max_brightness = dssdev->max_backlight_level; - bl->props.brightness = dssdev->max_backlight_level; - - r = nec_8048_bl_update_status(bl); - if (r < 0) - dev_err(&dssdev->dev, "failed to set lcd brightness\n"); - return 0; } static void nec_8048_panel_remove(struct omap_dss_device *dssdev) { struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev); - struct backlight_device *bl = necd->bl; - - bl->props.power = FB_BLANK_POWERDOWN; - nec_8048_bl_update_status(bl); - backlight_device_unregister(bl); kfree(necd); } @@ -169,8 +107,6 @@ static void nec_8048_panel_remove(struct omap_dss_device *dssdev) static int nec_8048_panel_power_on(struct omap_dss_device *dssdev) { 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; @@ -188,10 +124,6 @@ static int nec_8048_panel_power_on(struct omap_dss_device *dssdev) goto err1; } - r = nec_8048_bl_update_status(bl); - if (r < 0) - dev_err(&dssdev->dev, "failed to set lcd brightness\n"); - return 0; err1: omapdss_dpi_display_disable(dssdev); @@ -201,15 +133,9 @@ err0: 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; - 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); |