From ea5abbd215b749b2ff14397a47a5e65741c67bf4 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 26 Sep 2011 19:00:02 +0100 Subject: ARM: 7101/1: arm/tegra: Replace with This will eventually allow to be deleted. This mirrors LinusW's recent equivalent work on various other ARM platforms. Signed-off-by: Stephen Warren Acked-by: Olof Johansson Signed-off-by: Russell King --- arch/arm/mach-tegra/include/mach/gpio-tegra.h | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 arch/arm/mach-tegra/include/mach/gpio-tegra.h (limited to 'arch/arm/mach-tegra/include/mach/gpio-tegra.h') diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h new file mode 100644 index 000000000000..87d37fdf5084 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h @@ -0,0 +1,39 @@ +/* + * arch/arm/mach-tegra/include/mach/gpio.h + * + * Copyright (C) 2010 Google, Inc. + * + * Author: + * Erik Gilling + * + * 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_GPIO_TEGRA_H +#define __MACH_TEGRA_GPIO_TEGRA_H + +#include +#include + +#define TEGRA_NR_GPIOS INT_GPIO_NR + +#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) + +struct tegra_gpio_table { + int gpio; /* GPIO number */ + bool enable; /* Enable for GPIO at init? */ +}; + +void tegra_gpio_config(struct tegra_gpio_table *table, int num); +void tegra_gpio_enable(int gpio); +void tegra_gpio_disable(int gpio); + +#endif -- cgit v1.2.1