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