Re: [U-Boot] [PATCH v3 03/16] Add gpio_request() to asm-generic header

2012-01-09 Thread Kim Phillips
On Sun, 8 Jan 2012 03:44:19 -0500
Mike Frysinger vap...@gentoo.org wrote:

 On Tuesday 06 December 2011 20:24:02 Simon Glass wrote:
  +int gpio_request(unsigned gpio, const char *label);
 
 should add gpio_free too

fyi, I just sent Wolfgang a pull request for this:

commit 3608b70fec881ccd4e41180c22662293a7e37b66
Author: Joe Hershberger joe.hershber...@ni.com
Date:   Fri Nov 11 15:55:35 2011 -0600

gpio: Modify common gpio.h to more closely match Linux

Change int gp to unsigned gpio
Add request and free entry-points

Signed-off-by: Joe Hershberger joe.hershber...@ni.com
Cc: Joe Hershberger joe.hershber...@gmail.com
Signed-off-by: Kim Phillips kim.phill...@freescale.com

Kim

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 03/16] Add gpio_request() to asm-generic header

2012-01-08 Thread Mike Frysinger
On Tuesday 06 December 2011 20:24:02 Simon Glass wrote:
 +int gpio_request(unsigned gpio, const char *label);

should add gpio_free too
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 03/16] Add gpio_request() to asm-generic header

2011-12-06 Thread Simon Glass
This function should also be part of the GPIO API, so add it.

Signed-off-by: Simon Glass s...@chromium.org
---

 include/asm-generic/gpio.h |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index a1ebb28..c1d697f 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -72,3 +72,13 @@ int gpio_get_value(int gp);
  * @return 0 if ok, -1 on error
  */
 int gpio_set_value(int gp, int value);
+
+/**
+ * Request a gpio. This should be called before any of the other functions
+ * are used on this gpio.
+ *
+ * @param gp   GPIO number
+ * @param labelUser label for this GPIO
+ * @return 0 if ok, -1 on error
+ */
+int gpio_request(unsigned gpio, const char *label);
-- 
1.7.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot