125223a68SAneesh V /* 225223a68SAneesh V * Copyright (c) 2009 Wind River Systems, Inc. 325223a68SAneesh V * Tom Rix <Tom.Rix@windriver.com> 425223a68SAneesh V * 5*bcd4d4ebSWolfgang Denk * SPDX-License-Identifier: GPL-2.0 625223a68SAneesh V * 725223a68SAneesh V * This work is derived from the linux 2.6.27 kernel source 825223a68SAneesh V * To fetch, use the kernel repository 925223a68SAneesh V * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 1025223a68SAneesh V * Use the v2.6.27 tag. 1125223a68SAneesh V * 1225223a68SAneesh V * Below is the original's header including its copyright 1325223a68SAneesh V * 1425223a68SAneesh V * linux/arch/arm/plat-omap/gpio.c 1525223a68SAneesh V * 1625223a68SAneesh V * Support functions for OMAP GPIO 1725223a68SAneesh V * 1825223a68SAneesh V * Copyright (C) 2003-2005 Nokia Corporation 1925223a68SAneesh V * Written by Juha Yrjölä <juha.yrjola@nokia.com> 2025223a68SAneesh V */ 2125223a68SAneesh V #ifndef _GPIO_H 2225223a68SAneesh V #define _GPIO_H 2325223a68SAneesh V 2425223a68SAneesh V #include <asm/arch/cpu.h> 2525223a68SAneesh V 2625223a68SAneesh V struct gpio_bank { 2725223a68SAneesh V void *base; 2825223a68SAneesh V int method; 2925223a68SAneesh V }; 3025223a68SAneesh V 3125223a68SAneesh V extern const struct gpio_bank *const omap_gpio_bank; 3225223a68SAneesh V 3325223a68SAneesh V #define METHOD_GPIO_24XX 4 3425223a68SAneesh V 35dcee1ab3SNikita Kiryanov /** 36dcee1ab3SNikita Kiryanov * Check if gpio is valid. 37dcee1ab3SNikita Kiryanov * 38dcee1ab3SNikita Kiryanov * @param gpio GPIO number 39dcee1ab3SNikita Kiryanov * @return 1 if ok, 0 on error 40dcee1ab3SNikita Kiryanov */ 41dcee1ab3SNikita Kiryanov int gpio_is_valid(int gpio); 4225223a68SAneesh V #endif /* _GPIO_H_ */ 43