tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8800g / gpio.h
1 /*
2  *  linux/arch/arm/mach-sprd/gpio.h
3  *
4  *  Generic SPRD GPIO handling
5  *
6  *  Author:     Yingchun Li(yingchun.li@spreadtrum.com)
7  *  Created:    March 10, 2010
8  *  Copyright:  Spreadtrum Inc.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License version 2 as
12  *  published by the Free Software Foundation.
13  */
14 #ifndef __ARCH_ARM_MACH_GPIO_H_
15 #define  __ARCH_ARM_MACH_GPIO_H_
16
17 //#include <linux/init.h>
18
19 #ifndef WARN
20 # define WARN(num, fmt...) printf(fmt)
21 #endif
22
23 #ifndef ARRAY_SIZE
24 # define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
25 #endif
26
27 #define GPIO_MAX_PIN_NUM        205
28
29 #define ARCH_NR_GPIOS   GPIO_MAX_PIN_NUM
30
31 #define CHG_GPIO_NUM 162
32
33 #define POWER_BUTTON_GPIO_NUM 163
34 //#define gpio_get_value __gpio_get_value
35 //#define gpio_set_value __gpio_set_value
36 //#define gpio_to_irq  __gpio_to_irq
37
38 //extern __must_check int sprd_alloc_gpio_irq(unsigned gpio);
39 extern int sprd_alloc_gpio_irq(unsigned gpio);
40 extern int irq_to_gpio(unsigned long irq);
41 extern void sprd_free_gpio_irq(int irq);
42 extern int board_gpio_init(void);
43 #include <asm/arch/asm_generic_gpio.h>
44 #include <asm/arch/gpio_phy.h>
45
46 //extern void __init sprd_gpio_init(void);
47 #endif