aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-29 03:06:43 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-29 09:21:52 -0400
commit349c3d95f5f34379679489a29c19513644e0c08a (patch)
tree5fcf68d8e4d2a6be5de7dace10c1ae7aa6886a35 /drivers/video/omap2
parent35f5df6fd8048fae124c21b48b84dbc1879000bf (diff)
OMAPDSS: SDI: change regulator handling
Regulator handling for DPI and SDI is currently handled in the core.c, using the 'virtual' omapdss platform device. Nowadays we have proper devices for both DPI and SDI, and so we can handle the regulators inside the respective drivers. This patch moves the regulator handling for SDI into sdi.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/core.c15
-rw-r--r--drivers/video/omap2/dss/dss.h1
-rw-r--r--drivers/video/omap2/dss/sdi.c10
3 files changed, 3 insertions, 23 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 1aeb274e30fc..a07d62644026 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -44,7 +44,6 @@ static struct {
44 struct platform_device *pdev; 44 struct platform_device *pdev;
45 45
46 struct regulator *vdds_dsi_reg; 46 struct regulator *vdds_dsi_reg;
47 struct regulator *vdds_sdi_reg;
48 47
49 const char *default_display_name; 48 const char *default_display_name;
50} core; 49} core;
@@ -95,20 +94,6 @@ struct regulator *dss_get_vdds_dsi(void)
95 return reg; 94 return reg;
96} 95}
97 96
98struct regulator *dss_get_vdds_sdi(void)
99{
100 struct regulator *reg;
101
102 if (core.vdds_sdi_reg != NULL)
103 return core.vdds_sdi_reg;
104
105 reg = devm_regulator_get(&core.pdev->dev, "vdds_sdi");
106 if (!IS_ERR(reg))
107 core.vdds_sdi_reg = reg;
108
109 return reg;
110}
111
112int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask) 97int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask)
113{ 98{
114 struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; 99 struct omap_dss_board_info *board_data = core.pdev->dev.platform_data;
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 50a2362ef8f8..7d97de46b17f 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -165,7 +165,6 @@ struct platform_device;
165struct platform_device *dss_get_core_pdev(void); 165struct platform_device *dss_get_core_pdev(void);
166struct bus_type *dss_get_bus(void); 166struct bus_type *dss_get_bus(void);
167struct regulator *dss_get_vdds_dsi(void); 167struct regulator *dss_get_vdds_dsi(void);
168struct regulator *dss_get_vdds_sdi(void);
169int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); 168int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask);
170void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); 169void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask);
171int dss_set_min_bus_tput(struct device *dev, unsigned long tput); 170int dss_set_min_bus_tput(struct device *dev, unsigned long tput);
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 856af2e89760..82b64e3fbd08 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -267,14 +267,10 @@ static int sdi_init_regulator(void)
267 if (sdi.vdds_sdi_reg) 267 if (sdi.vdds_sdi_reg)
268 return 0; 268 return 0;
269 269
270 vdds_sdi = dss_get_vdds_sdi(); 270 vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi");
271
272 if (IS_ERR(vdds_sdi)) { 271 if (IS_ERR(vdds_sdi)) {
273 vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi"); 272 DSSERR("can't get VDDS_SDI regulator\n");
274 if (IS_ERR(vdds_sdi)) { 273 return PTR_ERR(vdds_sdi);
275 DSSERR("can't get VDDS_SDI regulator\n");
276 return PTR_ERR(vdds_sdi);
277 }
278 } 274 }
279 275
280 sdi.vdds_sdi_reg = vdds_sdi; 276 sdi.vdds_sdi_reg = vdds_sdi;