Skip to content

Commit

Permalink
arm/mxc: move IMX_GPIO_NR into mach/hardware.h
Browse files Browse the repository at this point in the history
The patch moves IMX_GPIO_NR into mach/hardware.h, so that we only
use standard gpiolib helpers in mach/gpio.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Shawn Guo authored and Sascha Hauer committed Aug 17, 2011
1 parent a439561 commit 1dfa86b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/arm/plat-mxc/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#include <mach/hardware.h>
#include <asm-generic/gpio.h>


/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))

/* use gpiolib dispatchers */
#define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/plat-mxc/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
.type = _type, \
}

/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))

#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio))

#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */

0 comments on commit 1dfa86b

Please sign in to comment.