upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / mach-s5pv310 / setup-tvout.c
1 /* linux/arch/arm/mach-s5pv310/setup-tvout.c
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * Base TVOUT gpio configuration
7  *
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.
11 */
12
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>
24 #include <linux/io.h>
25 #include <mach/map.h>
26 #include <mach/gpio.h>
27
28 struct platform_device; /* don't need the contents */
29
30 void s5p_int_src_hdmi_hpd(struct platform_device *pdev)
31 {
32         s3c_gpio_cfgpin(S5PV310_GPX3(7), S3C_GPIO_SFN(0x3));
33         s3c_gpio_setpull(S5PV310_GPX3(7), S3C_GPIO_PULL_DOWN);
34 #if 0
35         writel(readl(S5PV310_GPX3DRV)|0x3<<10, S5PV310_GPX3DRV);
36 #endif
37 }
38
39 void s5p_int_src_ext_hpd(struct platform_device *pdev)
40 {
41         s3c_gpio_cfgpin(S5PV310_GPX3(7), S3C_GPIO_SFN(0xf));
42         s3c_gpio_setpull(S5PV310_GPX3(7), S3C_GPIO_PULL_DOWN);
43 #if 0
44         writel(readl(S5PV310_GPX3DRV)|0x3<<10, S5PV310_GPX3DRV);
45 #endif
46 }
47
48 int s5p_hpd_read_gpio(struct platform_device *pdev)
49 {
50         return gpio_get_value(S5PV310_GPX3(7));
51 }
52
53 void s5p_cec_cfg_gpio(struct platform_device *pdev)
54 {
55 #if 0
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);
59 #endif
60 }
61
62