drm/exynos5: add irq resource to hdmi-audio device for hpd handling
authorRahul Sharma <rahul.sharma@samsung.com>
Mon, 17 Sep 2012 15:24:28 +0000 (20:54 +0530)
committerGerrit <chrome-bot@google.com>
Mon, 1 Oct 2012 22:20:14 +0000 (15:20 -0700)
Hdmi-audio device in alsa-soc needs hpd notifications for enabling and
disabling the audio. If hdmi-audio dapm switch is on and hdmi cable is
plugged-in, audio rendered on the speakers should also be routed to hdmi
audio sink. This patch adds irq resource information to the hdmi-audio
device so that it can requeste the hpd irq in shared mode.

BUG=chrome-os-partner:12908
TEST:verified hpd plug-unplug scenarions with audio playback and
dapm switch control toggling.

Change-Id: I3457e9c00d949205eca624395834ac92b4eb4bee
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/33423
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
drivers/gpu/drm/exynos/exynos_hdmi.c

index c21a392..da5aaf4 100644 (file)
@@ -2162,7 +2162,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
                        goto err_iomap;
                }
 
-               ret = platform_device_add_resources(hdmi_audio_device, res, 1);
+               ret = platform_device_add_resources(hdmi_audio_device, res, 2);
                if (ret) {
                        ret = -ENOMEM;
                        goto err_iomap;
@@ -2225,7 +2225,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
        INIT_WORK(&hdata->hotplug_work, hdmi_hotplug_func);
 
        ret = request_irq(hdata->internal_irq, hdmi_irq_handler,
-                       0, "int_hdmi", hdata->parent_ctx);
+                       IRQF_SHARED, "int_hdmi", hdata->parent_ctx);
        if (ret) {
                DRM_ERROR("request interrupt failed.\n");
                goto err_workqueue;
@@ -2233,7 +2233,8 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
        disable_irq(hdata->internal_irq);
 
        ret = request_irq(hdata->external_irq, hdmi_irq_handler,
-               IRQ_TYPE_EDGE_BOTH, "ext_hdmi", hdata->parent_ctx);
+               IRQ_TYPE_EDGE_BOTH | IRQF_SHARED, "ext_hdmi",
+               hdata->parent_ctx);
        if (ret) {
                DRM_ERROR("request interrupt failed.\n");
                goto err_workqueue;