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>
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__);
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.");