Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | nmk_gpio_platform_data |
Macros | |
#define | NMK_GPIO_DAT 0x00 |
#define | NMK_GPIO_DATS 0x04 |
#define | NMK_GPIO_DATC 0x08 |
#define | NMK_GPIO_PDIS 0x0c |
#define | NMK_GPIO_DIR 0x10 |
#define | NMK_GPIO_DIRS 0x14 |
#define | NMK_GPIO_DIRC 0x18 |
#define | NMK_GPIO_SLPC 0x1c |
#define | NMK_GPIO_AFSLA 0x20 |
#define | NMK_GPIO_AFSLB 0x24 |
#define | NMK_GPIO_LOWEMI 0x28 |
#define | NMK_GPIO_RIMSC 0x40 |
#define | NMK_GPIO_FIMSC 0x44 |
#define | NMK_GPIO_IS 0x48 |
#define | NMK_GPIO_IC 0x4c |
#define | NMK_GPIO_RWIMSC 0x50 |
#define | NMK_GPIO_FWIMSC 0x54 |
#define | NMK_GPIO_WKS 0x58 |
#define | NMK_GPIO_ALT_GPIO 0 |
#define | NMK_GPIO_ALT_A 1 |
#define | NMK_GPIO_ALT_B 2 |
#define | NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) |
#define | NMK_GPIO_ALT_CX_SHIFT 2 |
#define | NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
#define | NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
#define | NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
#define | NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
Enumerations | |
enum | nmk_gpio_pull { NMK_GPIO_PULL_NONE, NMK_GPIO_PULL_UP, NMK_GPIO_PULL_DOWN } |
enum | nmk_gpio_slpm { NMK_GPIO_SLPM_INPUT, NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT, NMK_GPIO_SLPM_NOCHANGE, NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE } |
Functions | |
int | nmk_gpio_set_slpm (int gpio, enum nmk_gpio_slpm mode) |
int | nmk_gpio_set_pull (int gpio, enum nmk_gpio_pull pull) |
int | nmk_gpio_get_mode (int gpio) |
void | nmk_gpio_wakeups_suspend (void) |
void | nmk_gpio_wakeups_resume (void) |
void | nmk_gpio_clocks_enable (void) |
void | nmk_gpio_clocks_disable (void) |
void | nmk_gpio_read_pull (int gpio_bank, u32 *pull_up) |
#define NMK_GPIO_AFSLA 0x20 |
Definition at line 30 of file gpio-nomadik.h.
#define NMK_GPIO_AFSLB 0x24 |
Definition at line 31 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_A 1 |
Definition at line 44 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_B 2 |
Definition at line 45 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) |
Definition at line 46 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
Definition at line 49 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
Definition at line 50 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
Definition at line 51 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) |
Definition at line 52 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_CX_SHIFT 2 |
Definition at line 48 of file gpio-nomadik.h.
#define NMK_GPIO_ALT_GPIO 0 |
Definition at line 43 of file gpio-nomadik.h.
#define NMK_GPIO_DAT 0x00 |
Definition at line 22 of file gpio-nomadik.h.
#define NMK_GPIO_DATC 0x08 |
Definition at line 24 of file gpio-nomadik.h.
#define NMK_GPIO_DATS 0x04 |
Definition at line 23 of file gpio-nomadik.h.
#define NMK_GPIO_DIR 0x10 |
Definition at line 26 of file gpio-nomadik.h.
#define NMK_GPIO_DIRC 0x18 |
Definition at line 28 of file gpio-nomadik.h.
#define NMK_GPIO_DIRS 0x14 |
Definition at line 27 of file gpio-nomadik.h.
#define NMK_GPIO_FIMSC 0x44 |
Definition at line 35 of file gpio-nomadik.h.
#define NMK_GPIO_FWIMSC 0x54 |
Definition at line 39 of file gpio-nomadik.h.
#define NMK_GPIO_IC 0x4c |
Definition at line 37 of file gpio-nomadik.h.
#define NMK_GPIO_IS 0x48 |
Definition at line 36 of file gpio-nomadik.h.
#define NMK_GPIO_LOWEMI 0x28 |
Definition at line 32 of file gpio-nomadik.h.
#define NMK_GPIO_PDIS 0x0c |
Definition at line 25 of file gpio-nomadik.h.
#define NMK_GPIO_RIMSC 0x40 |
Definition at line 34 of file gpio-nomadik.h.
#define NMK_GPIO_RWIMSC 0x50 |
Definition at line 38 of file gpio-nomadik.h.
#define NMK_GPIO_SLPC 0x1c |
Definition at line 29 of file gpio-nomadik.h.
#define NMK_GPIO_WKS 0x58 |
Definition at line 40 of file gpio-nomadik.h.
enum nmk_gpio_pull |
Definition at line 55 of file gpio-nomadik.h.
enum nmk_gpio_slpm |
NMK_GPIO_SLPM_INPUT | |
NMK_GPIO_SLPM_WAKEUP_ENABLE | |
NMK_GPIO_SLPM_NOCHANGE | |
NMK_GPIO_SLPM_WAKEUP_DISABLE |
Definition at line 62 of file gpio-nomadik.h.
Definition at line 1171 of file pinctrl-nomadik.c.
Definition at line 1157 of file pinctrl-nomadik.c.
Definition at line 678 of file pinctrl-nomadik.c.
Definition at line 1241 of file pinctrl-nomadik.c.
int nmk_gpio_set_pull | ( | int | gpio, |
enum nmk_gpio_pull | pull | ||
) |
nmk_gpio_set_pull() - enable/disable pull up/down on a gpio : pin number : one of NMK_GPIO_PULL_DOWN, NMK_GPIO_PULL_UP, and NMK_GPIO_PULL_NONE
Enables/disables pull up/down on a specified pin. This only takes effect if the pin is configured as an input (either explicitly or by the alternate function).
NOTE: If enabling the pull up/down, the caller must ensure that the GPIO is configured as an input. Otherwise, due to the way the controller registers work, this function will change the value output on the pin.
Definition at line 631 of file pinctrl-nomadik.c.
int nmk_gpio_set_slpm | ( | int | gpio, |
enum nmk_gpio_slpm | mode | ||
) |
nmk_gpio_set_slpm() - configure the sleep mode of a pin : pin number : NMK_GPIO_SLPM_INPUT or NMK_GPIO_SLPM_NOCHANGE,
This register is actually in the pinmux layer, not the GPIO block itself. The GPIO1B_SLPM register defines the GPIO mode when SLEEP/DEEP-SLEEP mode is entered (i.e. when signal IOFORCE is HIGH by the platform code). Each GPIO can be configured to be forced into GPIO mode when IOFORCE is HIGH, overriding the normal setting defined by GPIO_AFSELx registers. When IOFORCE returns LOW (by software, after SLEEP/DEEP-SLEEP exit), the GPIOs return to the normal setting defined by GPIO_AFSELx registers.
If is NMK_GPIO_SLPM_INPUT, the corresponding GPIO is switched to GPIO mode when signal IOFORCE is HIGH (i.e. when SLEEP/DEEP-SLEEP mode is entered) regardless of the altfunction selected. Also wake-up detection is ENABLED.
If is NMK_GPIO_SLPM_NOCHANGE, the corresponding GPIO remains controlled by NMK_GPIO_DATC, NMK_GPIO_DATS, NMK_GPIO_DIR, NMK_GPIO_PDIS (for altfunction GPIO) or respective on-chip peripherals (for other altfuncs) when IOFORCE is HIGH. Also wake-up detection DISABLED.
Note that enable_irq_wake() will automatically enable wakeup detection.
Definition at line 596 of file pinctrl-nomadik.c.
Definition at line 1215 of file pinctrl-nomadik.c.
Definition at line 1194 of file pinctrl-nomadik.c.