aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/video/omap2/dss/dpi.c12
-rw-r--r--drivers/video/omap2/dss/dss_features.c1
-rw-r--r--drivers/video/omap2/dss/dss_features.h1
3 files changed, 9 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();
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 938709724f0..2fe39d65502 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -373,6 +373,7 @@ static const enum dss_feat_id omap3430_dss_feat_list[] = {
373 FEAT_ALPHA_FIXED_ZORDER, 373 FEAT_ALPHA_FIXED_ZORDER,
374 FEAT_FIFO_MERGE, 374 FEAT_FIFO_MERGE,
375 FEAT_OMAP3_DSI_FIFO_BUG, 375 FEAT_OMAP3_DSI_FIFO_BUG,
376 FEAT_DPI_USES_VDDS_DSI,
376}; 377};
377 378
378static const enum dss_feat_id omap3630_dss_feat_list[] = { 379static const enum dss_feat_id omap3630_dss_feat_list[] = {
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index 996ffcbfed5..26d43a4b981 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -50,6 +50,7 @@ enum dss_feat_id {
50 FEAT_DSI_VC_OCP_WIDTH, 50 FEAT_DSI_VC_OCP_WIDTH,
51 FEAT_DSI_REVERSE_TXCLKESC, 51 FEAT_DSI_REVERSE_TXCLKESC,
52 FEAT_DSI_GNQ, 52 FEAT_DSI_GNQ,
53 FEAT_DPI_USES_VDDS_DSI,
53 FEAT_HDMI_CTS_SWMODE, 54 FEAT_HDMI_CTS_SWMODE,
54 FEAT_HDMI_AUDIO_USE_MCLK, 55 FEAT_HDMI_AUDIO_USE_MCLK,
55 FEAT_HANDLE_UV_SEPARATE, 56 FEAT_HANDLE_UV_SEPARATE,