2 * Structures and registers for GPIO access in the Nomadik SoC
4 * Code ported from Nomadik GPIO driver in ST-Ericsson Linux kernel code.
5 * The purpose is that GPIO config found in kernel should work by simply
6 * copy-paste it to U-boot.
9 * Copyright (C) 2010 Joakim Axelsson <joakim.axelsson AT stericsson.com>
10 * Copyright (C) 2008 STMicroelectronics
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
19 #ifndef __DB8500_GPIO_H__
20 #define __DB8500_GPIO_H__
22 /* Alternate functions: function C is set in hw by setting both A and B */
23 enum db8500_gpio_alt {
24 DB8500_GPIO_ALT_GPIO = 0,
25 DB8500_GPIO_ALT_A = 1,
26 DB8500_GPIO_ALT_B = 2,
27 DB8500_GPIO_ALT_C = (DB8500_GPIO_ALT_A | DB8500_GPIO_ALT_B)
30 enum db8500_gpio_pull {
31 DB8500_GPIO_PULL_NONE,
36 void db8500_gpio_set_pull(unsigned gpio, enum db8500_gpio_pull pull);
37 void db8500_gpio_make_input(unsigned gpio);
38 int db8500_gpio_get_input(unsigned gpio);
39 void db8500_gpio_make_output(unsigned gpio, int val);
40 void db8500_gpio_set_output(unsigned gpio, int val);
42 #endif /* __DB8500_GPIO_H__ */