Commit 746c087b authored by Hans de Goede's avatar Hans de Goede
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
parent 11d52a9d
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment