diff options
author | Archit Taneja <archit@ti.com> | 2011-09-08 12:30:19 +0530 |
---|---|---|
committer | Sebastien Jan <s-jan@ti.com> | 2011-10-14 10:43:00 +0200 |
commit | 9eb9d3f3023c9532cf8d61dea3e284d0ec99a296 (patch) | |
tree | 2660c19daf9d8d1bbba33cb9b20445cc88fd06c8 | |
parent | a67c0887d1873a3f518b796ddbe124fe633e69a2 (diff) |
OMAPDSS: DISPC: Create helper function dispc_mgr_is_lcd()
Create a helper function called dispc_mgr_is_lcd() which returns true if the
manager is LCD or LCD2.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 6357eb5d39ae..ee4b6ebbd371 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -564,13 +564,20 @@ void dispc_runtime_put(void) WARN_ON(r < 0); } - +static inline bool dispc_mgr_is_lcd(enum omap_channel channel) +{ + if (channel == OMAP_DSS_CHANNEL_LCD || + channel == OMAP_DSS_CHANNEL_LCD2) + return true; + else + return false; +} + bool dispc_go_busy(enum omap_channel channel) { int bit; - if (channel == OMAP_DSS_CHANNEL_LCD || - channel == OMAP_DSS_CHANNEL_LCD2) + if (dispc_mgr_is_lcd(channel)) bit = 5; /* GOLCD */ else bit = 6; /* GODIGIT */ @@ -586,8 +593,7 @@ void dispc_go(enum omap_channel channel) int bit; bool enable_bit, go_bit; - if (channel == OMAP_DSS_CHANNEL_LCD || - channel == OMAP_DSS_CHANNEL_LCD2) + if (dispc_mgr_is_lcd(channel)) bit = 0; /* LCDENABLE */ else bit = 1; /* DIGITALENABLE */ @@ -601,8 +607,7 @@ void dispc_go(enum omap_channel channel) if (!enable_bit) return; - if (channel == OMAP_DSS_CHANNEL_LCD || - channel == OMAP_DSS_CHANNEL_LCD2) + if (dispc_mgr_is_lcd(channel)) bit = 5; /* GOLCD */ else bit = 6; /* GODIGIT */ @@ -2103,8 +2108,7 @@ bool dispc_is_channel_enabled(enum omap_channel channel) void dispc_enable_channel(enum omap_channel channel, bool enable) { - if (channel == OMAP_DSS_CHANNEL_LCD || - channel == OMAP_DSS_CHANNEL_LCD2) + if (dispc_mgr_is_lcd(channel)) dispc_enable_lcd_out(channel, enable); else if (channel == OMAP_DSS_CHANNEL_DIGIT) dispc_enable_digit_out(enable); |