Commit | Line | Data |
---|---|---|
54862bf0 | 1 | /* |
f30d12b3 | 2 | * Copyright (c) 2011,2012, NVIDIA CORPORATION. All rights reserved. |
54862bf0 SW |
3 | * |
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 | |
6 | * may be copied, distributed, and modified under those terms. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | */ | |
14 | ||
15 | #ifndef __MACH_TEGRA_BOARD_PINMUX_H | |
16 | #define __MACH_TEGRA_BOARD_PINMUX_H | |
17 | ||
f30d12b3 SW |
18 | #include <linux/pinctrl/machine.h> |
19 | ||
20 | #include <mach/pinconf-tegra.h> | |
21 | ||
52f48fe0 | 22 | #define PINMUX_DEV "tegra20-pinctrl" |
54862bf0 | 23 | |
f30d12b3 SW |
24 | #define TEGRA_MAP_MUX(_group_, _function_) \ |
25 | PIN_MAP_MUX_GROUP_HOG_DEFAULT(PINMUX_DEV, _group_, _function_) | |
54862bf0 | 26 | |
f30d12b3 SW |
27 | #define TEGRA_MAP_CONF(_group_, _pull_, _drive_) \ |
28 | PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(PINMUX_DEV, _group_, tegra_pincfg_pull##_pull_##_##_drive_) | |
54862bf0 | 29 | |
f30d12b3 SW |
30 | #define TEGRA_MAP_MUXCONF(_group_, _function_, _pull_, _drive_) \ |
31 | TEGRA_MAP_MUX(_group_, _function_), \ | |
32 | TEGRA_MAP_CONF(_group_, _pull_, _drive_) | |
33 | ||
34 | extern unsigned long tegra_pincfg_pullnone_driven[2]; | |
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; | |
54862bf0 SW |
49 | }; |
50 | ||
51 | void tegra_board_pinmux_init(struct tegra_board_pinmux_conf *conf_a, | |
52 | struct tegra_board_pinmux_conf *conf_b); | |
53 | ||
54 | #endif |