fbdev: sh_mobile_hdmi: add interrupt output option
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 8 May 2012 04:07:20 +0000 (21:07 -0700)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 13 May 2012 13:07:59 +0000 (13:07 +0000)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/sh_mobile_hdmi.c
include/video/sh_mobile_hdmi.h

index e201d6fea2d6e210a11f81b150d30ae54e524c2b..0bc39bc976a849220cb6d03974b402eaed517f44 100644 (file)
@@ -1186,6 +1186,13 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
        pm_runtime_enable(&pdev->dev);
        pm_runtime_get_sync(&pdev->dev);
 
+       /* init interrupt polarity */
+       if (pdata->flags & HDMI_OUTPUT_PUSH_PULL)
+               hdmi_bit_set(hdmi, 0x02, 0x02, HDMI_SYSTEM_CTRL);
+
+       if (pdata->flags & HDMI_OUTPUT_POLARITY_HI)
+               hdmi_bit_set(hdmi, 0x01, 0x01, HDMI_SYSTEM_CTRL);
+
        /* Product and revision IDs are 0 in sh-mobile version */
        dev_info(&pdev->dev, "Detected HDMI controller 0x%x:0x%x\n",
                 hdmi_read(hdmi, HDMI_PRODUCT_ID), hdmi_read(hdmi, HDMI_REVISION_ID));
index 728f9de9c258255d868709fc8ae2eac8987c682a..2699635a99efefe2de7888ded7c8300c7a0af1c9 100644 (file)
@@ -18,9 +18,10 @@ struct clk;
 /*
  * flags format
  *
- * 0x0000000A
+ * 0x000000BA
  *
  * A: Audio source select
+ * B: Int output option
  */
 
 /* Audio source select */
@@ -30,6 +31,11 @@ struct clk;
 #define HDMI_SND_SRC_DSD       (2 << 0)
 #define HDMI_SND_SRC_HBR       (3 << 0)
 
+/* Int output option */
+#define HDMI_OUTPUT_PUSH_PULL  (1 << 4) /* System control : output mode */
+#define HDMI_OUTPUT_POLARITY_HI        (1 << 5) /* System control : output polarity */
+
+
 struct sh_mobile_hdmi_info {
        unsigned int                     flags;
        long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq,