summaryrefslogtreecommitdiff
path: root/doc/README.omap3
diff options
context:
space:
mode:
authorSanjeev Premi <premi@ti.com>2011-09-08 10:48:39 -0400
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-09-13 08:25:15 +0200
commit3b690ebbbf21303a3bac1f62d967c36cd8655ce0 (patch)
tree838e69822e7349ed723c168b0f1e7a328e08ac75 /doc/README.omap3
parent81bdc155c72ef9e093b388b90c58d8134d870976 (diff)
downloadu-boot-imx-3b690ebbbf21303a3bac1f62d967c36cd8655ce0.zip
u-boot-imx-3b690ebbbf21303a3bac1f62d967c36cd8655ce0.tar.gz
u-boot-imx-3b690ebbbf21303a3bac1f62d967c36cd8655ce0.tar.bz2
omap: gpio: generic changes after changing API
This patch contains the generic changes required after change to generic API in the previous patch. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'doc/README.omap3')
-rw-r--r--doc/README.omap320
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/README.omap3 b/doc/README.omap3
index 460950d..1768cdd 100644
--- a/doc/README.omap3
+++ b/doc/README.omap3
@@ -98,24 +98,24 @@ gpio
To set a bit :
- if (!omap_request_gpio(N)) {
- omap_set_gpio_direction(N, 0);
- omap_set_gpio_dataout(N, 1);
+ if (!gpio_request(N, "")) {
+ gpio_direction_output(N, 0);
+ gpio_set_value(N, 1);
}
To clear a bit :
- if (!omap_request_gpio(N)) {
- omap_set_gpio_direction(N, 0);
- omap_set_gpio_dataout(N, 0);
+ if (!gpio_request(N, "")) {
+ gpio_direction_output(N, 0);
+ gpio_set_value(N, 0);
}
To read a bit :
- if (!omap_request_gpio(N)) {
- omap_set_gpio_direction(N, 1);
- val = omap_get_gpio_datain(N);
- omap_free_gpio(N);
+ if (!gpio_request(N, "")) {
+ gpio_direction_input(N);
+ val = gpio_get_value(N);
+ gpio_free(N);
}
if (val)
printf("GPIO N is set\n");