diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-pinmux.h')
-rw-r--r-- | arch/arm/mach-tegra/board-pinmux.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/board-pinmux.h b/arch/arm/mach-tegra/board-pinmux.h index 4aac73546f5..c5f3f3381e8 100644 --- a/arch/arm/mach-tegra/board-pinmux.h +++ b/arch/arm/mach-tegra/board-pinmux.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011,2012, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This software is licensed under the terms of the GNU General Public | 4 | * This software is licensed under the terms of the GNU General Public |
5 | * License version 2, as published by the Free Software Foundation, and | 5 | * License version 2, as published by the Free Software Foundation, and |
@@ -15,21 +15,37 @@ | |||
15 | #ifndef __MACH_TEGRA_BOARD_PINMUX_H | 15 | #ifndef __MACH_TEGRA_BOARD_PINMUX_H |
16 | #define __MACH_TEGRA_BOARD_PINMUX_H | 16 | #define __MACH_TEGRA_BOARD_PINMUX_H |
17 | 17 | ||
18 | #define GPIO_DEV "tegra-gpio" | 18 | #include <linux/pinctrl/machine.h> |
19 | #define PINMUX_DEV "tegra-pinmux" | ||
20 | 19 | ||
21 | struct tegra_pingroup_config; | 20 | #include <mach/pinconf-tegra.h> |
22 | struct tegra_gpio_table; | ||
23 | 21 | ||
24 | struct tegra_board_pinmux_conf { | 22 | #define PINMUX_DEV "tegra20-pinctrl" |
25 | struct tegra_pingroup_config *pgs; | 23 | |
26 | int pg_count; | 24 | #define TEGRA_MAP_MUX(_group_, _function_) \ |
25 | PIN_MAP_MUX_GROUP_HOG_DEFAULT(PINMUX_DEV, _group_, _function_) | ||
26 | |||
27 | #define TEGRA_MAP_CONF(_group_, _pull_, _drive_) \ | ||
28 | PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(PINMUX_DEV, _group_, tegra_pincfg_pull##_pull_##_##_drive_) | ||
27 | 29 | ||
28 | struct tegra_drive_pingroup_config *drives; | 30 | #define TEGRA_MAP_MUXCONF(_group_, _function_, _pull_, _drive_) \ |
29 | int drive_count; | 31 | TEGRA_MAP_MUX(_group_, _function_), \ |
32 | TEGRA_MAP_CONF(_group_, _pull_, _drive_) | ||
30 | 33 | ||
31 | struct tegra_gpio_table *gpios; | 34 | extern unsigned long tegra_pincfg_pullnone_driven[2]; |
32 | int gpio_count; | 35 | extern unsigned long tegra_pincfg_pullnone_tristate[2]; |
36 | extern unsigned long tegra_pincfg_pullnone_na[1]; | ||
37 | extern unsigned long tegra_pincfg_pullup_driven[2]; | ||
38 | extern unsigned long tegra_pincfg_pullup_tristate[2]; | ||
39 | extern unsigned long tegra_pincfg_pullup_na[1]; | ||
40 | extern unsigned long tegra_pincfg_pulldown_driven[2]; | ||
41 | extern unsigned long tegra_pincfg_pulldown_tristate[2]; | ||
42 | extern unsigned long tegra_pincfg_pulldown_na[1]; | ||
43 | extern unsigned long tegra_pincfg_pullna_driven[1]; | ||
44 | extern unsigned long tegra_pincfg_pullna_tristate[1]; | ||
45 | |||
46 | struct tegra_board_pinmux_conf { | ||
47 | struct pinctrl_map *maps; | ||
48 | int map_count; | ||
33 | }; | 49 | }; |
34 | 50 | ||
35 | void tegra_board_pinmux_init(struct tegra_board_pinmux_conf *conf_a, | 51 | void tegra_board_pinmux_init(struct tegra_board_pinmux_conf *conf_a, |