aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-31 07:33:31 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 09:16:42 -0400
commit4a61e267c84e98caeddcab25432a871bf1a599dd (patch)
tree4ddb42872a60e72578358b056781ce2edc92e94c /drivers/video/omap2
parent7f6f3c4bf3f0fd4ea82682b5f1a417cbdbf4a27f (diff)
OMAP: DSS2: add dss_get_hdmi_venc_clk_source()
Add dss_get_hdmi_venc_clk_source(), which can be used to get the value programmed with dss_select_hdmi_venc_clk_source(). This can be used to find out if the digit output is going to VENC or HDMI. For OMAP2/3 dss_get_hdmi_venc_clk_source() always returns DSS_VENC_TV_CLK. Cc: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/dss.c11
-rw-r--r--drivers/video/omap2/dss/dss.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 356d3c15a639..3e09726d32c7 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -639,6 +639,17 @@ void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select hdmi)
639 REG_FLD_MOD(DSS_CONTROL, hdmi, 15, 15); /* VENC_HDMI_SWITCH */ 639 REG_FLD_MOD(DSS_CONTROL, hdmi, 15, 15); /* VENC_HDMI_SWITCH */
640} 640}
641 641
642enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void)
643{
644 enum omap_display_type displays;
645
646 displays = dss_feat_get_supported_displays(OMAP_DSS_CHANNEL_DIGIT);
647 if ((displays & OMAP_DISPLAY_TYPE_HDMI) == 0)
648 return DSS_VENC_TV_CLK;
649
650 return REG_GET(DSS_CONTROL, 15, 15);
651}
652
642static int dss_get_clocks(void) 653static int dss_get_clocks(void)
643{ 654{
644 struct clk *clk; 655 struct clk *clk;
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index d790580a6a3b..48bba53de0ab 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -205,6 +205,7 @@ int dss_runtime_get(void);
205void dss_runtime_put(void); 205void dss_runtime_put(void);
206 206
207void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select); 207void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
208enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void);
208const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); 209const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src);
209void dss_dump_clocks(struct seq_file *s); 210void dss_dump_clocks(struct seq_file *s);
210 211