change source file mode to 0644 instead of 0755
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / cpu / armv7 / tiger / gpio_prod.c
1 #include <asm/arch/gpio.h>
2 #include <asm/arch/mfp.h>
3
4 extern int sprd_gpio_request(struct gpio_chip *chip, unsigned offset);
5 extern void sprd_gpio_init(void);
6 static unsigned long pwr_gpio_cfg =
7     MFP_ANA_CFG_X(PBINT, AF0, DS1, F_PULL_UP,S_PULL_UP, IO_IE);
8
9
10 static unsigned long chg_gpio_cfg =
11     MFP_ANA_CFG_X(CHIP_RSTN, AF0, DS1, F_PULL_UP,S_PULL_UP, IO_IE);
12
13
14 int board_gpio_init(void)
15 {
16         sprd_gpio_init();
17         // config charger pin
18         sprd_mfp_config(&chg_gpio_cfg, 1);
19         sprd_gpio_request(NULL, CHG_GPIO_NUM);
20         sprd_gpio_direction_input(NULL,CHG_GPIO_NUM); 
21
22         // config power button 
23         sprd_mfp_config(&pwr_gpio_cfg, 1);
24         sprd_gpio_request(NULL, POWER_BUTTON_GPIO_NUM);
25         sprd_gpio_direction_input(NULL,POWER_BUTTON_GPIO_NUM);
26         return 0;
27 }