From ca0c936800487be83fafa5ef6f6f2a7200d87c97 Mon Sep 17 00:00:00 2001 From: Gregory Bean Date: Fri, 10 Sep 2010 15:03:37 -0700 Subject: [PATCH] --- yaml --- r: 212604 b: refs/heads/master c: 26cc66607189ac544edad04927f506599d990f0f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-msm/gpio.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 899060599dce..b322d84be96a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2783cc265cc57c4bbf788b75fa8c3f06259dffd1 +refs/heads/master: 26cc66607189ac544edad04927f506599d990f0f diff --git a/trunk/arch/arm/mach-msm/gpio.c b/trunk/arch/arm/mach-msm/gpio.c index 5040f1cb64f9..33051b509e88 100644 --- a/trunk/arch/arm/mach-msm/gpio.c +++ b/trunk/arch/arm/mach-msm/gpio.c @@ -21,6 +21,7 @@ #include #include #include "gpio_hw.h" +#include "gpiomux.h" #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0) @@ -44,6 +45,8 @@ .direction_input = msm_gpio_direction_input, \ .direction_output = msm_gpio_direction_output, \ .to_irq = msm_gpio_to_irq, \ + .request = msm_gpio_request, \ + .free = msm_gpio_free, \ } \ } @@ -171,6 +174,21 @@ static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset) return MSM_GPIO_TO_INT(chip->base + offset); } +#ifdef CONFIG_MSM_GPIOMUX +static int msm_gpio_request(struct gpio_chip *chip, unsigned offset) +{ + return msm_gpiomux_get(chip->base + offset); +} + +static void msm_gpio_free(struct gpio_chip *chip, unsigned offset) +{ + msm_gpiomux_put(chip->base + offset); +} +#else +#define msm_gpio_request NULL +#define msm_gpio_free NULL +#endif + struct msm_gpio_chip msm_gpio_chips[] = { #if defined(CONFIG_ARCH_MSM7X00A) MSM_GPIO_BANK(0, 0, 15),