diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-12-16 15:12:31 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-19 18:03:11 -0800 |
commit | 54862bf00968427cf8f7ffcb6dacf03161eae862 (patch) | |
tree | a8990b08d6380e23f8569d196c234306769f5501 /arch/arm/mach-tegra/board-pinmux.h | |
parent | b49cae59e12348474f7a82bbec187877f83381a9 (diff) | |
download | blackbird-op-linux-54862bf00968427cf8f7ffcb6dacf03161eae862.tar.gz blackbird-op-linux-54862bf00968427cf8f7ffcb6dacf03161eae862.zip |
arm/tegra: Refactor board-*-pinmux.c to share code
This moves the implementation of *_pinmux_init() into a single location.
The board-specific pinmux data is left in each board's own file. This
will allow future changes that set up the pinmux in a more complex
fashion to do so without duplicating that code in each board's pinmux
file.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-pinmux.h')
-rw-r--r-- | arch/arm/mach-tegra/board-pinmux.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-pinmux.h b/arch/arm/mach-tegra/board-pinmux.h new file mode 100644 index 000000000000..4aac73546f54 --- /dev/null +++ b/arch/arm/mach-tegra/board-pinmux.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __MACH_TEGRA_BOARD_PINMUX_H +#define __MACH_TEGRA_BOARD_PINMUX_H + +#define GPIO_DEV "tegra-gpio" +#define PINMUX_DEV "tegra-pinmux" + +struct tegra_pingroup_config; +struct tegra_gpio_table; + +struct tegra_board_pinmux_conf { + struct tegra_pingroup_config *pgs; + int pg_count; + + struct tegra_drive_pingroup_config *drives; + int drive_count; + + struct tegra_gpio_table *gpios; + int gpio_count; +}; + +void tegra_board_pinmux_init(struct tegra_board_pinmux_conf *conf_a, + struct tegra_board_pinmux_conf *conf_b); + +#endif |