Thread (1 message) 1 message, 1 author, 2010-11-24
DORMANTno replies

[patch 1/1] iMX51: introduce MX51_GPIO_NR

From: Arnaud Patard Rtp <hidden>
Date: 2010-11-24 16:28:27

Amit Kucheria [off-list ref] writes:

[...]
quoted
Index: gpionr/arch/arm/plat-mxc/include/mach/iomux-mx51.h
===================================================================
--- gpionr.orig/arch/arm/plat-mxc/include/mach/iomux-mx51.h	2010-11-22 23:04:23.000000000 +0100
+++ gpionr/arch/arm/plat-mxc/include/mach/iomux-mx51.h	2010-11-22 23:04:25.000000000 +0100
@@ -15,6 +15,8 @@
 
 #include <mach/iomux-v3.h>
 
Please add a comment here that bank numbers start from 1 to make it explicit
ok.
quoted
+#define MX51_GPIO_NR(bank, nr)		((bank-1)*32+nr)
+
                                                 ^^^^^^^^^ whitespace fixes

Also, why is this in iomux-mx51.h?
Because I thought it was a good place to put it. fwiw, I've no strong opinion
on where to put it.
It might be better to introduce a gpio.h
Introduce a gpio.h ? There's already one: arch/arm/plat-mxc/include/mach/gpio.h 
So, you prefer to see this macro in it ?

Arnaud
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help