1 /* linux/arch/arm/mach-s5pv310/setup-tvout.c
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * Base TVOUT gpio configuration
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/clk.h>
14 #include <linux/delay.h>
15 #include <linux/err.h>
16 #include <linux/gpio.h>
17 #include <linux/kernel.h>
18 #include <linux/platform_device.h>
19 #include <linux/types.h>
20 #include <plat/clock.h>
21 #include <plat/gpio-cfg.h>
22 #include <mach/regs-clock.h>
23 #include <mach/regs-gpio.h>
26 #include <mach/gpio.h>
28 struct platform_device; /* don't need the contents */
30 void s5p_int_src_hdmi_hpd(struct platform_device *pdev)
32 s3c_gpio_cfgpin(S5PV310_GPX3(7), S3C_GPIO_SFN(0x3));
33 s3c_gpio_setpull(S5PV310_GPX3(7), S3C_GPIO_PULL_DOWN);
35 writel(readl(S5PV310_GPX3DRV)|0x3<<10, S5PV310_GPX3DRV);
39 void s5p_int_src_ext_hpd(struct platform_device *pdev)
41 s3c_gpio_cfgpin(S5PV310_GPX3(7), S3C_GPIO_SFN(0xf));
42 s3c_gpio_setpull(S5PV310_GPX3(7), S3C_GPIO_PULL_DOWN);
44 writel(readl(S5PV310_GPX3DRV)|0x3<<10, S5PV310_GPX3DRV);
48 int s5p_hpd_read_gpio(struct platform_device *pdev)
50 return gpio_get_value(S5PV310_GPX3(7));
53 void s5p_cec_cfg_gpio(struct platform_device *pdev)
56 /* To make sure we don't use cec feature */
57 s3c_gpio_cfgpin(S5PV310_GPX3(6), S3C_GPIO_SFN(0x3));
58 s3c_gpio_setpull(S5PV310_GPX3(6), S3C_GPIO_PULL_NONE);