1*4e5ae09eSTom Warren /* 2*4e5ae09eSTom Warren * Copyright (c) 2011, NVIDIA Corp. All rights reserved. 3*4e5ae09eSTom Warren * See file CREDITS for list of people who contributed to this 4*4e5ae09eSTom Warren * project. 5*4e5ae09eSTom Warren * 6*4e5ae09eSTom Warren * This program is free software; you can redistribute it and/or 7*4e5ae09eSTom Warren * modify it under the terms of the GNU General Public License as 8*4e5ae09eSTom Warren * published by the Free Software Foundation; either version 2 of 9*4e5ae09eSTom Warren * the License, or (at your option) any later version. 10*4e5ae09eSTom Warren * 11*4e5ae09eSTom Warren * This program is distributed in the hope that it will be useful, 12*4e5ae09eSTom Warren * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*4e5ae09eSTom Warren * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*4e5ae09eSTom Warren * GNU General Public License for more details. 15*4e5ae09eSTom Warren * 16*4e5ae09eSTom Warren * You should have received a copy of the GNU General Public License 17*4e5ae09eSTom Warren * along with this program; if not, write to the Free Software 18*4e5ae09eSTom Warren * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19*4e5ae09eSTom Warren * MA 02111-1307 USA 20*4e5ae09eSTom Warren */ 21*4e5ae09eSTom Warren 22*4e5ae09eSTom Warren #ifndef _GPIO_H_ 23*4e5ae09eSTom Warren #define _GPIO_H_ 24*4e5ae09eSTom Warren 25*4e5ae09eSTom Warren #include <asm/arch/gpio.h> 26*4e5ae09eSTom Warren /* 27*4e5ae09eSTom Warren * Generic GPIO API 28*4e5ae09eSTom Warren */ 29*4e5ae09eSTom Warren 30*4e5ae09eSTom Warren int gpio_request(int gp, const char *label); 31*4e5ae09eSTom Warren void gpio_free(int gp); 32*4e5ae09eSTom Warren void gpio_toggle_value(int gp); 33*4e5ae09eSTom Warren int gpio_direction_input(int gp); 34*4e5ae09eSTom Warren int gpio_direction_output(int gp, int value); 35*4e5ae09eSTom Warren int gpio_get_value(int gp); 36*4e5ae09eSTom Warren void gpio_set_value(int gp, int value); 37*4e5ae09eSTom Warren 38*4e5ae09eSTom Warren #endif /* _GPIO_H_ */ 39