asoc: exynos: hdmi-audio use platform data for hpd gpio information
authorRahul Sharma <rahul.sharma@samsung.com>
Sun, 14 Oct 2012 02:10:23 +0000 (07:40 +0530)
committerGerrit <chrome-bot@google.com>
Mon, 15 Oct 2012 16:34:13 +0000 (09:34 -0700)
With this patch, hdmi-audio driver gets the gpio pin number from
platform data instead of getting from device tree. Due to that
of_get_named_gpio_flags was resetting the pin function to hpd
instead of external interrupt. This breaks the hotplug detection.

BUG=chrome-os-partner:15274
TEST=1) Boot with/without hdmi plugged.
2) S2R scenarios.
3) Audio playback with hpd scenarios.

Change-Id: I592942347040003cfe550f97436dacc5aa73a95f
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/35514
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
sound/soc/samsung/hdmi_audio.c

index 87f8ed4..446925d 100644 (file)
@@ -471,7 +471,6 @@ static __devinit int hdmi_audio_probe(struct platform_device *pdev)
        int ret = 0;
        struct hdmi_audio_context *ctx;
        struct resource *res;
-       enum of_gpio_flags flags;
        struct device_node *parent_node;
 
        snd_printdd(&pdev->dev, "[%d] %s\n", __LINE__, __func__);
@@ -534,8 +533,7 @@ static __devinit int hdmi_audio_probe(struct platform_device *pdev)
                goto err_workq;
        }
 
-       ctx->hpd_gpio = of_get_named_gpio_flags(parent_node,
-                               "hpd-gpio", 0, &flags);
+       ctx->hpd_gpio = (int)pdev->dev.platform_data;
 
        if (!gpio_is_valid(ctx->hpd_gpio)) {
                dev_err(&pdev->dev, "failed to get hpd gpio.");