]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sunxi: gpio: Build sunxi_name_to_gpio_bank for driver-model code too
authorHans de Goede <hdegoede@redhat.com>
Wed, 22 Apr 2015 15:59:01 +0000 (17:59 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 May 2015 14:51:52 +0000 (16:51 +0200)
When doing a driver-model enabled build we still need sunxi_name_to_gpio_bank
(for now) for the mmc pinmux code in board/sunxi/board.c, so build it for
driver-model enabled builds too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
drivers/gpio/sunxi_gpio.c

index e6a90b93afbdb066d06d0e1b1285efda3639a072..91af1a54ec50afa0953cf498befe70df019ec3c2 100644 (file)
@@ -118,20 +118,6 @@ int gpio_set_value(unsigned gpio, int value)
        return sunxi_gpio_output(gpio, value);
 }
 
-int sunxi_name_to_gpio_bank(const char *name)
-{
-       int group = 0;
-
-       if (*name == 'P' || *name == 'p')
-               name++;
-       if (*name >= 'A') {
-               group = *name - (*name > 'a' ? 'a' : 'A');
-               return group;
-       }
-
-       return -1;
-}
-
 int sunxi_name_to_gpio(const char *name)
 {
        int group = 0;
@@ -171,6 +157,20 @@ int sunxi_name_to_gpio(const char *name)
 }
 #endif
 
+int sunxi_name_to_gpio_bank(const char *name)
+{
+       int group = 0;
+
+       if (*name == 'P' || *name == 'p')
+               name++;
+       if (*name >= 'A') {
+               group = *name - (*name > 'a' ? 'a' : 'A');
+               return group;
+       }
+
+       return -1;
+}
+
 #ifdef CONFIG_DM_GPIO
 /* TODO(sjg@chromium.org): Remove this function and use device tree */
 int sunxi_name_to_gpio(const char *name)