aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/setup-hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/setup-hdmi.c')
-rw-r--r--arch/arm/mach-exynos/setup-hdmi.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/setup-hdmi.c b/arch/arm/mach-exynos/setup-hdmi.c
new file mode 100644
index 0000000..b3ce85b
--- /dev/null
+++ b/arch/arm/mach-exynos/setup-hdmi.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics Co.Ltd
+ * Author: Joonyoung Shim <jy0922.shim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundationr
+ */
+
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <plat/gpio-cfg.h>
+
+void s5p_hdmi_cfg_hpd(bool enable)
+{
+ if (enable)
+ s3c_gpio_cfgpin(GPIO_HDMI_HPD, S3C_GPIO_SFN(3));
+ else
+ s3c_gpio_cfgpin(GPIO_HDMI_HPD, S3C_GPIO_SFN(0xf));
+
+ s3c_gpio_setpull(GPIO_HDMI_HPD, S3C_GPIO_PULL_DOWN);
+}
+
+int s5p_hdmi_get_hpd(void)
+{
+ return !!gpio_get_value(GPIO_HDMI_HPD);
+}