aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorChandrabhanu Mahapatra <cmahapatra@ti.com>2012-08-22 02:14:06 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-08-22 04:43:05 -0400
commit195e672a76056478cc79f5c48343164c9237852e (patch)
tree08ccf5051d4e7b84b8e5c251afa64d24fd3dd20f /drivers/video/omap2/dss/dpi.c
parentee223b703033ccfc2a47c3bb3e7352b4f5828fd2 (diff)
OMAPDSS: DPI: Remove cpu_is_xxxx checks
The OMAP3 checks have been removed and replaced by a dss feature FEAT_DPI_USES_VDDS_DSI for cleaner implementation. The patches "OMAP: DSS2: enable VDDS_DSI when using DPI" (8a2cfea8cc) by Tomi Valkeinen <tomi.valkeinen@nokia.com> and "ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c" (4041071571) by Russell King <rmk+kernel@arm.linux.org.uk> had introduced these checks. As it is evident from these patches a dependency exists for some DSS pins on VDDS_DSI which is better shown by dss feature FEAT_DPI_USES_VDDS_DSI. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index f260343e245..25fb8953b80 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -34,6 +34,7 @@
34#include <plat/cpu.h> 34#include <plat/cpu.h>
35 35
36#include "dss.h" 36#include "dss.h"
37#include "dss_features.h"
37 38
38static struct { 39static struct {
39 struct regulator *vdds_dsi_reg; 40 struct regulator *vdds_dsi_reg;
@@ -175,7 +176,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
175 176
176 mutex_lock(&dpi.lock); 177 mutex_lock(&dpi.lock);
177 178
178 if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { 179 if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) && !dpi.vdds_dsi_reg) {
179 DSSERR("no VDSS_DSI regulator\n"); 180 DSSERR("no VDSS_DSI regulator\n");
180 r = -ENODEV; 181 r = -ENODEV;
181 goto err_no_reg; 182 goto err_no_reg;
@@ -193,7 +194,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
193 goto err_start_dev; 194 goto err_start_dev;
194 } 195 }
195 196
196 if (cpu_is_omap34xx()) { 197 if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI)) {
197 r = regulator_enable(dpi.vdds_dsi_reg); 198 r = regulator_enable(dpi.vdds_dsi_reg);
198 if (r) 199 if (r)
199 goto err_reg_enable; 200 goto err_reg_enable;
@@ -239,7 +240,7 @@ err_dsi_pll_init:
239err_get_dsi: 240err_get_dsi:
240 dispc_runtime_put(); 241 dispc_runtime_put();
241err_get_dispc: 242err_get_dispc:
242 if (cpu_is_omap34xx()) 243 if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI))
243 regulator_disable(dpi.vdds_dsi_reg); 244 regulator_disable(dpi.vdds_dsi_reg);
244err_reg_enable: 245err_reg_enable:
245 omap_dss_stop_device(dssdev); 246 omap_dss_stop_device(dssdev);
@@ -265,7 +266,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
265 266
266 dispc_runtime_put(); 267 dispc_runtime_put();
267 268
268 if (cpu_is_omap34xx()) 269 if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI))
269 regulator_disable(dpi.vdds_dsi_reg); 270 regulator_disable(dpi.vdds_dsi_reg);
270 271
271 omap_dss_stop_device(dssdev); 272 omap_dss_stop_device(dssdev);
@@ -362,7 +363,8 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
362{ 363{
363 DSSDBG("init_display\n"); 364 DSSDBG("init_display\n");
364 365
365 if (cpu_is_omap34xx() && dpi.vdds_dsi_reg == NULL) { 366 if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
367 dpi.vdds_dsi_reg == NULL) {
366 struct regulator *vdds_dsi; 368 struct regulator *vdds_dsi;
367 369
368 vdds_dsi = dss_get_vdds_dsi(); 370 vdds_dsi = dss_get_vdds_dsi();