diff options
author | Dirk Eibach <eibach@gdsys.de> | 2011-10-31 09:39:12 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2011-11-18 14:04:25 +0100 |
commit | 042f9f106272a46214dccbe6177b11d87798351d (patch) | |
tree | 9017d9d3cdb3d18fa8a679dcd2968f6c0ba676dc /include/pca9698.h | |
parent | 5721385b187b3154c7768e6c182501022f4e2e45 (diff) | |
download | u-boot-imx-042f9f106272a46214dccbe6177b11d87798351d.zip u-boot-imx-042f9f106272a46214dccbe6177b11d87798351d.tar.gz u-boot-imx-042f9f106272a46214dccbe6177b11d87798351d.tar.bz2 |
gpio: Adapt PCA9698 to standard GPIO API
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/pca9698.h')
-rw-r--r-- | include/pca9698.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/include/pca9698.h b/include/pca9698.h index 2506088..67b364e 100644 --- a/include/pca9698.h +++ b/include/pca9698.h @@ -1,9 +1,34 @@ +/* + * (C) Copyright 2011 + * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + #ifndef __PCA9698_H_ #define __PCA9698_H_ -int pca9698_direction_input(u8 chip, unsigned offset); -int pca9698_direction_output(u8 chip, unsigned offset); -int pca9698_get_input(u8 chip, unsigned offset); -int pca9698_set_output(u8 chip, unsigned offset, int value); +int pca9698_request(unsigned gpio, const char *label); +void pca9698_free(unsigned gpio); +int pca9698_direction_input(u8 addr, unsigned gpio); +int pca9698_direction_output(u8 addr, unsigned gpio, int value); +int pca9698_get_value(u8 addr, unsigned gpio); +int pca9698_set_value(u8 addr, unsigned gpio, int value); #endif /* __PCA9698_H_ */ |