diff options
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 212cb800a5d2..5a5c31c163c7 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -1725,7 +1725,7 @@ static void _enable_lcd_out(bool enable) | |||
1725 | REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 0, 0); | 1725 | REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 0, 0); |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | void dispc_enable_lcd_out(bool enable) | 1728 | static void dispc_enable_lcd_out(bool enable) |
1729 | { | 1729 | { |
1730 | struct completion frame_done_completion; | 1730 | struct completion frame_done_completion; |
1731 | bool is_on; | 1731 | bool is_on; |
@@ -1772,7 +1772,7 @@ static void _enable_digit_out(bool enable) | |||
1772 | REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 1, 1); | 1772 | REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 1, 1); |
1773 | } | 1773 | } |
1774 | 1774 | ||
1775 | void dispc_enable_digit_out(bool enable) | 1775 | static void dispc_enable_digit_out(bool enable) |
1776 | { | 1776 | { |
1777 | struct completion frame_done_completion; | 1777 | struct completion frame_done_completion; |
1778 | int r; | 1778 | int r; |
@@ -1836,6 +1836,26 @@ void dispc_enable_digit_out(bool enable) | |||
1836 | enable_clocks(0); | 1836 | enable_clocks(0); |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | bool dispc_is_channel_enabled(enum omap_channel channel) | ||
1840 | { | ||
1841 | if (channel == OMAP_DSS_CHANNEL_LCD) | ||
1842 | return !!REG_GET(DISPC_CONTROL, 0, 0); | ||
1843 | else if (channel == OMAP_DSS_CHANNEL_DIGIT) | ||
1844 | return !!REG_GET(DISPC_CONTROL, 1, 1); | ||
1845 | else | ||
1846 | BUG(); | ||
1847 | } | ||
1848 | |||
1849 | void dispc_enable_channel(enum omap_channel channel, bool enable) | ||
1850 | { | ||
1851 | if (channel == OMAP_DSS_CHANNEL_LCD) | ||
1852 | dispc_enable_lcd_out(enable); | ||
1853 | else if (channel == OMAP_DSS_CHANNEL_DIGIT) | ||
1854 | dispc_enable_digit_out(enable); | ||
1855 | else | ||
1856 | BUG(); | ||
1857 | } | ||
1858 | |||
1839 | void dispc_lcd_enable_signal_polarity(bool act_high) | 1859 | void dispc_lcd_enable_signal_polarity(bool act_high) |
1840 | { | 1860 | { |
1841 | enable_clocks(1); | 1861 | enable_clocks(1); |