Linux Kernel
3.7.1
|
Go to the source code of this file.
Typedefs | |
typedef unsigned long | pin_cfg_t |
Functions | |
int | nmk_config_pin (pin_cfg_t cfg, bool sleep) |
int | nmk_config_pins (pin_cfg_t *cfgs, int num) |
int | nmk_config_pins_sleep (pin_cfg_t *cfgs, int num) |
#define PIN_ALT | ( | x | ) | (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT) |
#define PIN_ALT_A (NMK_GPIO_ALT_A << PIN_ALT_SHIFT) |
#define PIN_ALT_B (NMK_GPIO_ALT_B << PIN_ALT_SHIFT) |
#define PIN_ALT_C (NMK_GPIO_ALT_C << PIN_ALT_SHIFT) |
#define PIN_CFG | ( | num, | |
alt | |||
) |
#define PIN_DIR | ( | x | ) | (((x) & PIN_DIR_MASK) >> PIN_DIR_SHIFT) |
#define PIN_DIR_INPUT (0 << PIN_DIR_SHIFT) |
#define PIN_DIR_OUTPUT (1 << PIN_DIR_SHIFT) |
#define PIN_GPIO (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT) |
#define PIN_GPIOMODE | ( | x | ) | (((x) & PIN_GPIOMODE_MASK) >> PIN_GPIOMODE_SHIFT) |
#define PIN_GPIOMODE_DISABLED (0 << PIN_GPIOMODE_SHIFT) |
#define PIN_GPIOMODE_ENABLED (1 << PIN_GPIOMODE_SHIFT) |
#define PIN_INPUT_NOPULL (PIN_DIR_INPUT | PIN_PULL_NONE) |
#define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN) |
#define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP) |
#define PIN_LOWEMI | ( | x | ) | (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT) |
#define PIN_LOWEMI_DISABLED (0 << PIN_LOWEMI_SHIFT) |
#define PIN_LOWEMI_ENABLED (1 << PIN_LOWEMI_SHIFT) |
#define PIN_NUM | ( | x | ) | ((x) & PIN_NUM_MASK) |
#define PIN_OUTPUT_HIGH (PIN_DIR_OUTPUT | PIN_VAL_HIGH) |
#define PIN_OUTPUT_LOW (PIN_DIR_OUTPUT | PIN_VAL_LOW) |
#define PIN_PULL | ( | x | ) | (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT) |
#define PIN_PULL_DOWN (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT) |
#define PIN_PULL_NONE (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT) |
#define PIN_PULL_UP (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT) |
#define PIN_SLEEPMODE | ( | x | ) | (((x) & PIN_SLEEPMODE_MASK) >> PIN_SLEEPMODE_SHIFT) |
#define PIN_SLEEPMODE_DISABLED (0 << PIN_SLEEPMODE_SHIFT) |
#define PIN_SLEEPMODE_ENABLED (1 << PIN_SLEEPMODE_SHIFT) |
#define PIN_SLPM | ( | x | ) | (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT) |
#define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */ |
#define PIN_SLPM_DIR | ( | x | ) | (((x) & PIN_SLPM_DIR_MASK) >> PIN_SLPM_DIR_SHIFT) |
#define PIN_SLPM_DIR_INPUT ((1 + 0) << PIN_SLPM_DIR_SHIFT) |
#define PIN_SLPM_DIR_OUTPUT ((1 + 1) << PIN_SLPM_DIR_SHIFT) |
#define PIN_SLPM_GPIO PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */ |
#define PIN_SLPM_INPUT_NOPULL (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_NONE) |
#define PIN_SLPM_INPUT_PULLDOWN (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_DOWN) |
#define PIN_SLPM_INPUT_PULLUP (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_UP) |
#define PIN_SLPM_MAKE_INPUT (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT) |
#define PIN_SLPM_NOCHANGE (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT) |
#define PIN_SLPM_OUTPUT_HIGH (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_HIGH) |
#define PIN_SLPM_OUTPUT_LOW (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_LOW) |
#define PIN_SLPM_PDIS | ( | x | ) | (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT) |
#define PIN_SLPM_PDIS_DISABLED (1 << PIN_SLPM_PDIS_SHIFT) |
#define PIN_SLPM_PDIS_ENABLED (2 << PIN_SLPM_PDIS_SHIFT) |
#define PIN_SLPM_PDIS_NO_CHANGE (0 << PIN_SLPM_PDIS_SHIFT) |
#define PIN_SLPM_PULL | ( | x | ) | (((x) & PIN_SLPM_PULL_MASK) >> PIN_SLPM_PULL_SHIFT) |
#define PIN_SLPM_PULL_DOWN ((1 + NMK_GPIO_PULL_DOWN) << PIN_SLPM_PULL_SHIFT) |
#define PIN_SLPM_PULL_NONE ((1 + NMK_GPIO_PULL_NONE) << PIN_SLPM_PULL_SHIFT) |
#define PIN_SLPM_PULL_UP ((1 + NMK_GPIO_PULL_UP) << PIN_SLPM_PULL_SHIFT) |
#define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE |
#define PIN_SLPM_VAL | ( | x | ) | (((x) & PIN_SLPM_VAL_MASK) >> PIN_SLPM_VAL_SHIFT) |
#define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT) |
#define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT) |
#define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT) |
#define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT) |
#define PIN_VAL | ( | x | ) | (((x) & PIN_VAL_MASK) >> PIN_VAL_SHIFT) |
#define PIN_VAL_HIGH (1 << PIN_VAL_SHIFT) |
#define PIN_VAL_LOW (0 << PIN_VAL_SHIFT) |
nmk_config_pin - configure a pin's mux attributes : pin confguration : Non-zero to apply the sleep mode configuration Configures a pin's mode (alternate function or GPIO), its pull up status, and its sleep mode based on the specified configuration. The is usually one of the SoC specific macros defined in mach/<soc>-pins.h. These are constructed using, and can be further enhanced with, the macros in plat/pincfg.h.
If a pin's mode is set to GPIO, it is configured as an input to avoid side-effects. The gpio can be manipulated later using standard GPIO API calls.
Definition at line 545 of file pinctrl-nomadik.c.
nmk_config_pins - configure several pins at once : array of pin configurations : number of elments in the array
Configures several pins using nmk_config_pin(). Refer to that function for further information.
Definition at line 559 of file pinctrl-nomadik.c.
Definition at line 565 of file pinctrl-nomadik.c.