summaryrefslogtreecommitdiff
path: root/drivers/gpio/sunxi_gpio.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-04-18 17:33:44 (GMT)
committerHans de Goede <hdegoede@redhat.com>2015-05-04 14:51:52 (GMT)
commit07ce60f3cd21de20576e69ba10beabc905643500 (patch)
treee256ac32f6523a0cfa4067831b205c80b7dc096f /drivers/gpio/sunxi_gpio.c
parent4f7e01c9615e6f0b21e00c2a0900b2db2b23b4fc (diff)
downloadu-boot-fsl-qoriq-07ce60f3cd21de20576e69ba10beabc905643500.tar.xz
sunxi: gpio: Rename GPIOs to include a 'P' prefix
By convention, sunxi GPIOs are named PA1, PA2 instead of A1, A2. Change the driver model GPIO driver for sunxi to use these names. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/gpio/sunxi_gpio.c')
-rw-r--r--drivers/gpio/sunxi_gpio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index cf5c624..29301c4 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -249,10 +249,11 @@ static char *gpio_bank_name(int bank)
{
char *name;
- name = malloc(2);
+ name = malloc(3);
if (name) {
- name[0] = 'A' + bank;
- name[1] = '\0';
+ name[0] = 'P';
+ name[1] = 'A' + bank;
+ name[2] = '\0';
}
return name;