summaryrefslogtreecommitdiff
path: root/doc/README.omap3
diff options
context:
space:
mode:
authorTom Rix <Tom.Rix@windriver.com>2009-05-15 23:48:36 +0200
committerWolfgang Denk <wd@denx.de>2009-06-12 20:39:50 +0200
commit0c872ecd01d6782ae9d37b6eb721404a4a48f356 (patch)
tree522a36bcdfc4b52423c410de64e853384a84eb7a /doc/README.omap3
parent376aee78dd66ae0dc4ce496cbe93ecc80aaad48e (diff)
downloadu-boot-imx-0c872ecd01d6782ae9d37b6eb721404a4a48f356.zip
u-boot-imx-0c872ecd01d6782ae9d37b6eb721404a4a48f356.tar.gz
u-boot-imx-0c872ecd01d6782ae9d37b6eb721404a4a48f356.tar.bz2
OMAP3 Port kernel omap gpio interface.
Port version 2.6.27 of the linux kernel's omap gpio interface to u-boot. The orignal source is in linux/arch/arm/plat-omap/gpio.c See doc/README.omap3 for instructions on use. Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Diffstat (limited to 'doc/README.omap3')
-rw-r--r--doc/README.omap332
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/README.omap3 b/doc/README.omap3
index 9ab0979..e05e816 100644
--- a/doc/README.omap3
+++ b/doc/README.omap3
@@ -84,6 +84,38 @@ For all other commands see
help
+Interfaces
+==========
+
+gpio
+
+To set a bit :
+
+ if (!omap_request_gpio(N)) {
+ omap_set_gpio_direction(N, 0);
+ omap_set_gpio_dataout(N, 1);
+ }
+
+To clear a bit :
+
+ if (!omap_request_gpio(N)) {
+ omap_set_gpio_direction(N, 0);
+ omap_set_gpio_dataout(N, 0);
+ }
+
+To read a bit :
+
+ if (!omap_request_gpio(N)) {
+ omap_set_gpio_direction(NULL, 1);
+ val = omap_get_gpio_datain(N);
+ omap_free_gpio(N);
+ }
+ if (val)
+ printf("GPIO N is set\n");
+ else
+ printf("GPIO N is clear\n");
+
+
Acknowledgements
================