summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2012-02-17 13:34:53 -0600
committerAlan Tull <r80115@freescale.com>2012-02-17 13:45:10 -0600
commit6b063b2e6f2b5a258f2b3bcc92f81810af77a825 (patch)
tree3cc38b101143dcac23924b10ac22f626a097d348 /drivers
parent4f01f76f4e60713cba46b754f99e785c6d46e597 (diff)
ENGR00173964 make hdmi audio init dependent on hdmi video init
Don't show hdmi as an audio playback device if hdmi isn't configured on the command line. Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/mxc-hdmi-core.c14
-rw-r--r--drivers/video/mxc_hdmi.c2
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c
index 1aa92a01c40c..18fd1a67ba83 100644
--- a/drivers/mfd/mxc-hdmi-core.c
+++ b/drivers/mfd/mxc-hdmi-core.c
@@ -63,6 +63,7 @@ static int hdmi_ratio;
int mxc_hdmi_ipu_id;
int mxc_hdmi_disp_id;
static struct mxc_edid_cfg hdmi_core_edid_cfg;
+static int hdmi_core_init;
u8 hdmi_readb(unsigned int reg)
{
@@ -487,6 +488,16 @@ void hdmi_get_edid_cfg(struct mxc_edid_cfg *cfg)
spin_unlock_irqrestore(&edid_spinlock, flags);
}
+void hdmi_set_registered(int registered)
+{
+ hdmi_core_init = registered;
+}
+
+int hdmi_get_registered(void)
+{
+ return hdmi_core_init;
+}
+
static int mxc_hdmi_core_probe(struct platform_device *pdev)
{
struct fsl_mxc_hdmi_core_platform_data *pdata = pdev->dev.platform_data;
@@ -498,6 +509,9 @@ static int mxc_hdmi_core_probe(struct platform_device *pdev)
overflow_lo = false;
overflow_hi = false;
#endif
+
+ hdmi_core_init = 0;
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENOENT;
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c
index 0462f09a8fee..9d95e94def82 100644
--- a/drivers/video/mxc_hdmi.c
+++ b/drivers/video/mxc_hdmi.c
@@ -2060,11 +2060,13 @@ static int mxc_hdmi_fb_event(struct notifier_block *nb,
case FB_EVENT_FB_REGISTERED:
dev_dbg(&hdmi->pdev->dev, "event=FB_EVENT_FB_REGISTERED\n");
mxc_hdmi_fb_registered(hdmi);
+ hdmi_set_registered(1);
break;
case FB_EVENT_FB_UNREGISTERED:
dev_dbg(&hdmi->pdev->dev, "event=FB_EVENT_FB_UNREGISTERED\n");
hdmi->fb_reg = false;
+ hdmi_set_registered(0);
break;
case FB_EVENT_MODE_CHANGE: