Message ID | 1429883310-22441-10-git-send-email-hdegoede@redhat.com |
---|---|
State | Accepted |
Delegated to: | Hans de Goede |
Headers | show |
On 24 April 2015 at 07:48, Hans de Goede <hdegoede@redhat.com> wrote: > When doing a device-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 > device-model enabled builds too. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > drivers/gpio/sunxi_gpio.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) Oh dear! Hope it goes away soon. Reviewed-by: Simon Glass <sjg@chromium.org> > > diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c > index e6a90b9..91af1a5 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) > -- > 2.3.5 >
On Fri, 2015-04-24 at 15:48 +0200, Hans de Goede wrote: > When doing a device-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 > device-model enabled builds too. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index e6a90b9..91af1a5 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)
When doing a device-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 device-model enabled builds too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/gpio/sunxi_gpio.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)