From: Sanjeev Premi <premi@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 2/3] omap: gpio: generic changes after changing API
Date: Wed, 31 Aug 2011 01:22:33 +0530 [thread overview]
Message-ID: <1314733954-29576-3-git-send-email-premi@ti.com> (raw)
In-Reply-To: <1314733954-29576-1-git-send-email-premi@ti.com>
This patch contains the generic changes required after
change to generic API in the previous patch.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: Sunil Kumar <sunilsaini05@gmail.com>
Cc: Shashi Ranjan <shashiranjanmca05@gmail.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Steve Sakoman <steve@sakoman.com>
---
These changes could have been merged with the previous
patch, but kept changes to API separate from the usage.
arch/arm/cpu/armv7/omap4/clocks.c | 4 ++--
doc/README.omap3 | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap4/clocks.c b/arch/arm/cpu/armv7/omap4/clocks.c
index eda960c..56cdbe4 100644
--- a/arch/arm/cpu/armv7/omap4/clocks.c
+++ b/arch/arm/cpu/armv7/omap4/clocks.c
@@ -481,8 +481,8 @@ static void do_scale_tps62361(u32 reg, u32 volt_mv)
* VSEL1 is grounded on board. So the following selects
* VSEL1 = 0 and VSEL0 = 1
*/
- omap_set_gpio_direction(TPS62361_VSEL0_GPIO, 0);
- omap_set_gpio_dataout(TPS62361_VSEL0_GPIO, 1);
+ gpio_direction_output(TPS62361_VSEL0_GPIO);
+ gpio_set_value(TPS62361_VSEL0_GPIO, 1);
temp = TPS62361_I2C_SLAVE_ADDR |
(reg << PRM_VC_VAL_BYPASS_REGADDR_SHIFT) |
diff --git a/doc/README.omap3 b/doc/README.omap3
index 460950d..2a18133 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);
+ 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);
+ 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");
--
1.7.0.4
next prev parent reply other threads:[~2011-08-30 19:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 19:52 [U-Boot] [RFC 0/3] omap: gpio: User generic (instead of custom) API Sanjeev Premi
2011-08-30 19:52 ` [U-Boot] [RFC 1/3] omap: gpio: Use generic API Sanjeev Premi
2011-08-30 19:52 ` Sanjeev Premi [this message]
2011-08-30 19:52 ` [U-Boot] [PATCH 3/3] omap: gpio: Adapt board files to use " Sanjeev Premi
2011-08-30 19:55 ` Premi, Sanjeev
2011-09-01 16:48 ` [U-Boot] [RFC 0/3] omap: gpio: User generic (instead of custom) API Luca Ceresoli
2011-09-02 13:15 ` Premi, Sanjeev
2011-09-02 5:50 ` Premi, Sanjeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314733954-29576-3-git-send-email-premi@ti.com \
--to=premi@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox