diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-14 06:25:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-03 08:19:45 -0400 |
commit | 02b804893affd71856ab7148e8293ed78df287c4 (patch) | |
tree | d526973afa7cefb96984cebe9c251e723d899985 | |
parent | 058cc3bf90efbbc19c639472ad5644aa6ca7779d (diff) |
OMAPDSS: ls037v7dw01: remove platform backlight calls
Sharp ls037v7dw01 driver contains support to call platform backlight
functions. These are not used by any board, and can be removed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c index cada8c621e01..eb6bd817a079 100644 --- a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/backlight.h> | ||
24 | #include <linux/fb.h> | 23 | #include <linux/fb.h> |
25 | #include <linux/err.h> | 24 | #include <linux/err.h> |
26 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
@@ -28,7 +27,6 @@ | |||
28 | #include <video/omapdss.h> | 27 | #include <video/omapdss.h> |
29 | 28 | ||
30 | struct sharp_data { | 29 | struct sharp_data { |
31 | struct backlight_device *bl; | ||
32 | }; | 30 | }; |
33 | 31 | ||
34 | static struct omap_video_timings sharp_ls_timings = { | 32 | static struct omap_video_timings sharp_ls_timings = { |
@@ -52,45 +50,10 @@ static struct omap_video_timings sharp_ls_timings = { | |||
52 | .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES, | 50 | .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES, |
53 | }; | 51 | }; |
54 | 52 | ||
55 | static int sharp_ls_bl_update_status(struct backlight_device *bl) | ||
56 | { | ||
57 | struct omap_dss_device *dssdev = dev_get_drvdata(&bl->dev); | ||
58 | int level; | ||
59 | |||
60 | if (!dssdev->set_backlight) | ||
61 | return -EINVAL; | ||
62 | |||
63 | if (bl->props.fb_blank == FB_BLANK_UNBLANK && | ||
64 | bl->props.power == FB_BLANK_UNBLANK) | ||
65 | level = bl->props.brightness; | ||
66 | else | ||
67 | level = 0; | ||
68 | |||
69 | return dssdev->set_backlight(dssdev, level); | ||
70 | } | ||
71 | |||
72 | static int sharp_ls_bl_get_brightness(struct backlight_device *bl) | ||
73 | { | ||
74 | if (bl->props.fb_blank == FB_BLANK_UNBLANK && | ||
75 | bl->props.power == FB_BLANK_UNBLANK) | ||
76 | return bl->props.brightness; | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | static const struct backlight_ops sharp_ls_bl_ops = { | ||
82 | .get_brightness = sharp_ls_bl_get_brightness, | ||
83 | .update_status = sharp_ls_bl_update_status, | ||
84 | }; | ||
85 | |||
86 | |||
87 | 53 | ||
88 | static int sharp_ls_panel_probe(struct omap_dss_device *dssdev) | 54 | static int sharp_ls_panel_probe(struct omap_dss_device *dssdev) |
89 | { | 55 | { |
90 | struct backlight_properties props; | ||
91 | struct backlight_device *bl; | ||
92 | struct sharp_data *sd; | 56 | struct sharp_data *sd; |
93 | int r; | ||
94 | 57 | ||
95 | dssdev->panel.timings = sharp_ls_timings; | 58 | dssdev->panel.timings = sharp_ls_timings; |
96 | 59 | ||
@@ -100,37 +63,12 @@ static int sharp_ls_panel_probe(struct omap_dss_device *dssdev) | |||
100 | 63 | ||
101 | dev_set_drvdata(&dssdev->dev, sd); | 64 | dev_set_drvdata(&dssdev->dev, sd); |
102 | 65 | ||
103 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
104 | props.max_brightness = dssdev->max_backlight_level; | ||
105 | props.type = BACKLIGHT_RAW; | ||
106 | |||
107 | bl = backlight_device_register("sharp-ls", &dssdev->dev, dssdev, | ||
108 | &sharp_ls_bl_ops, &props); | ||
109 | if (IS_ERR(bl)) { | ||
110 | r = PTR_ERR(bl); | ||
111 | kfree(sd); | ||
112 | return r; | ||
113 | } | ||
114 | sd->bl = bl; | ||
115 | |||
116 | bl->props.fb_blank = FB_BLANK_UNBLANK; | ||
117 | bl->props.power = FB_BLANK_UNBLANK; | ||
118 | bl->props.brightness = dssdev->max_backlight_level; | ||
119 | r = sharp_ls_bl_update_status(bl); | ||
120 | if (r < 0) | ||
121 | dev_err(&dssdev->dev, "failed to set lcd brightness\n"); | ||
122 | |||
123 | return 0; | 66 | return 0; |
124 | } | 67 | } |
125 | 68 | ||
126 | static void __exit sharp_ls_panel_remove(struct omap_dss_device *dssdev) | 69 | static void __exit sharp_ls_panel_remove(struct omap_dss_device *dssdev) |
127 | { | 70 | { |
128 | struct sharp_data *sd = dev_get_drvdata(&dssdev->dev); | 71 | struct sharp_data *sd = dev_get_drvdata(&dssdev->dev); |
129 | struct backlight_device *bl = sd->bl; | ||
130 | |||
131 | bl->props.power = FB_BLANK_POWERDOWN; | ||
132 | sharp_ls_bl_update_status(bl); | ||
133 | backlight_device_unregister(bl); | ||
134 | 72 | ||
135 | kfree(sd); | 73 | kfree(sd); |
136 | } | 74 | } |