summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-04-22 17:59:01 +0200
committerHans de Goede <hdegoede@redhat.com>2015-05-04 16:51:52 +0200
commit746c087bd3538dc2c2b744e44815a3d5ce94e3bc (patch)
treeb180b68f3562cd2519207ab47d7b104792783226 /drivers/gpio
parent11d52a9da6d377f39217f2a96f2304f533f5af6d (diff)
downloadblackbird-obmc-uboot-746c087bd3538dc2c2b744e44815a3d5ce94e3bc.tar.gz
blackbird-obmc-uboot-746c087bd3538dc2c2b744e44815a3d5ce94e3bc.zip
sunxi: gpio: Build sunxi_name_to_gpio_bank for driver-model code too
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/sunxi_gpio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index e6a90b93af..91af1a54ec 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -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)
OpenPOWER on IntegriCloud