aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-04 10:13:16 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-12 05:46:08 -0500
commit80b1cc23ac96373bd5ff17f8959f2587d6fc37dd (patch)
treee2f17abe2820510ad74f6970009789b8d809ddfa /drivers/video/omap2/displays
parent8a2cfea8ccb6292dc43c37968fe08475ae7c2576 (diff)
OMAP: 3430SDP: remove vdvi regulator
The regulator is now enabled by DSS driver, and thus the panel driver doesn't need to touch it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
index bbe880bbe795..e207d66908d6 100644
--- a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
+++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
@@ -25,14 +25,6 @@
25 25
26#include <plat/display.h> 26#include <plat/display.h>
27 27
28struct sharp_data {
29 /* XXX This regulator should actually be in SDP board file, not here,
30 * as it doesn't actually power the LCD, but something else that
31 * affects the output to LCD (I think. Somebody clarify). It doesn't do
32 * harm here, as SDP is the only board using this currently */
33 struct regulator *vdvi_reg;
34};
35
36static struct omap_video_timings sharp_ls_timings = { 28static struct omap_video_timings sharp_ls_timings = {
37 .x_res = 480, 29 .x_res = 480,
38 .y_res = 640, 30 .y_res = 640,
@@ -50,48 +42,25 @@ static struct omap_video_timings sharp_ls_timings = {
50 42
51static int sharp_ls_panel_probe(struct omap_dss_device *dssdev) 43static int sharp_ls_panel_probe(struct omap_dss_device *dssdev)
52{ 44{
53 struct sharp_data *sd;
54
55 dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | 45 dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
56 OMAP_DSS_LCD_IHS; 46 OMAP_DSS_LCD_IHS;
57 dssdev->panel.acb = 0x28; 47 dssdev->panel.acb = 0x28;
58 dssdev->panel.timings = sharp_ls_timings; 48 dssdev->panel.timings = sharp_ls_timings;
59 49
60 sd = kzalloc(sizeof(*sd), GFP_KERNEL);
61 if (!sd)
62 return -ENOMEM;
63
64 dev_set_drvdata(&dssdev->dev, sd);
65
66 sd->vdvi_reg = regulator_get(&dssdev->dev, "vdvi");
67 if (IS_ERR(sd->vdvi_reg)) {
68 kfree(sd);
69 pr_err("failed to get VDVI regulator\n");
70 return PTR_ERR(sd->vdvi_reg);
71 }
72
73 return 0; 50 return 0;
74} 51}
75 52
76static void sharp_ls_panel_remove(struct omap_dss_device *dssdev) 53static void sharp_ls_panel_remove(struct omap_dss_device *dssdev)
77{ 54{
78 struct sharp_data *sd = dev_get_drvdata(&dssdev->dev);
79
80 regulator_put(sd->vdvi_reg);
81
82 kfree(sd);
83} 55}
84 56
85static int sharp_ls_panel_enable(struct omap_dss_device *dssdev) 57static int sharp_ls_panel_enable(struct omap_dss_device *dssdev)
86{ 58{
87 struct sharp_data *sd = dev_get_drvdata(&dssdev->dev);
88 int r = 0; 59 int r = 0;
89 60
90 /* wait couple of vsyncs until enabling the LCD */ 61 /* wait couple of vsyncs until enabling the LCD */
91 msleep(50); 62 msleep(50);
92 63
93 regulator_enable(sd->vdvi_reg);
94
95 if (dssdev->platform_enable) 64 if (dssdev->platform_enable)
96 r = dssdev->platform_enable(dssdev); 65 r = dssdev->platform_enable(dssdev);
97 66
@@ -100,13 +69,9 @@ static int sharp_ls_panel_enable(struct omap_dss_device *dssdev)
100 69
101static void sharp_ls_panel_disable(struct omap_dss_device *dssdev) 70static void sharp_ls_panel_disable(struct omap_dss_device *dssdev)
102{ 71{
103 struct sharp_data *sd = dev_get_drvdata(&dssdev->dev);
104
105 if (dssdev->platform_disable) 72 if (dssdev->platform_disable)
106 dssdev->platform_disable(dssdev); 73 dssdev->platform_disable(dssdev);
107 74
108 regulator_disable(sd->vdvi_reg);
109
110 /* wait at least 5 vsyncs after disabling the LCD */ 75 /* wait at least 5 vsyncs after disabling the LCD */
111 76
112 msleep(100); 77 msleep(100);