/* Get the direction of the GPIO by reading the GPIO_OE register corresponding to the specified bank.  */
static int _get_gpio_direction(const struct gpio_bank *bank, int gpio)
/* Get the direction of the GPIO by reading the GPIO_OE register corresponding to the specified bank.  */
static int _get_gpio_direction(const struct gpio_bank *bank, int gpio)
{
	void *reg = bank->base;
	u32 v;
	reg += OMAP_GPIO_OE;
	v = __raw_readl(reg);
	if (v & (1 << gpio))
		return OMAP_GPIO_DIR_IN;
	else
		return OMAP_GPIO_DIR_OUT;
}