mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/7] atmel_nand: check gpio validity before using it
@ 2013-12-07  9:36 Eric Bénard
  2013-12-07  9:36 ` [PATCH 2/7] at91: introduce sama5d3's SMC support Eric Bénard
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Eric Bénard @ 2013-12-07  9:36 UTC (permalink / raw)
  To: barebox

else we get : "invalid GPIO -22"
(as enable_pin is EINVAL)

tested on SAMA5D35

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/mtd/nand/atmel_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index a0f0966..658ae52 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -107,7 +107,7 @@ static struct nand_ecclayout atmel_pmecc_oobinfo;
  */
 static void atmel_nand_enable(struct atmel_nand_host *host)
 {
-	if (host->board->enable_pin)
+	if (gpio_is_valid(host->board->enable_pin))
 		gpio_set_value(host->board->enable_pin, 0);
 }
 
@@ -116,7 +116,7 @@ static void atmel_nand_enable(struct atmel_nand_host *host)
  */
 static void atmel_nand_disable(struct atmel_nand_host *host)
 {
-	if (host->board->enable_pin)
+	if (gpio_is_valid(host->board->enable_pin))
 		gpio_set_value(host->board->enable_pin, 1);
 }
 
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2013-12-12  9:54 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-07  9:36 [PATCH 1/7] atmel_nand: check gpio validity before using it Eric Bénard
2013-12-07  9:36 ` [PATCH 2/7] at91: introduce sama5d3's SMC support Eric Bénard
2013-12-09 13:27   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-12  8:51     ` Sascha Hauer
2013-12-12  9:53       ` Eric Bénard
2013-12-07  9:36 ` [PATCH 3/7] at91: sama5d3: use the sama5 smc instead of the sam9 one Eric Bénard
2013-12-09 13:28   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-07  9:36 ` [PATCH 4/7] sama5d3xek: update nand timings Eric Bénard
2013-12-07  9:36 ` [PATCH 5/7] atmel_nand: make chip_delay configurable Eric Bénard
2013-12-09 13:30   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 14:54     ` Eric Bénard
2013-12-09 16:32       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 16:57         ` Eric Bénard
2013-12-09 17:15         ` Eric Bénard
2013-12-10  7:25           ` Sascha Hauer
2013-12-07  9:36 ` [PATCH 6/7] sama5d3xek: add NOR CFI support Eric Bénard
2013-12-09 13:37   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-12  8:57     ` Sascha Hauer
2013-12-12  9:52       ` Eric Bénard
2013-12-07  9:37 ` [PATCH 7/7] samsa5d3xek: update defconfig Eric Bénard
2013-12-09 13:31   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 14:53     ` Eric Bénard
2013-12-09 16:33       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 16:48       ` Alexander Aring
2013-12-09  8:36 ` [PATCH 1/7] atmel_nand: check gpio validity before using it Sascha Hauer
2013-12-09 13:31   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 13:34 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox