diff options
author | Joel Stanley <joel@jms.id.au> | 2017-01-23 00:26:06 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-01-26 08:31:48 -0500 |
commit | 7153f8ef679d5fcb2d9c69a19613399194600f5b (patch) | |
tree | 8e61e1bfc361e768e406a5498d51bccbf04f9df1 /drivers/gpio/gpio-aspeed.c | |
parent | 47b03ca903fb07a69ba88d2e1629fe145771f116 (diff) |
gpio: aspeed: Make bank names strings
The Aspeed SoCs have more GPIOs than can be represented with A-Z. The
documentation uses two letter names such as AA and AB, so make the names
a three-character array in the bank struct to accommodate this.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-aspeed.c')
-rw-r--r-- | drivers/gpio/gpio-aspeed.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 03a5925a423c..20f6f8ae4671 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c | |||
@@ -28,39 +28,39 @@ struct aspeed_gpio { | |||
28 | struct aspeed_gpio_bank { | 28 | struct aspeed_gpio_bank { |
29 | uint16_t val_regs; | 29 | uint16_t val_regs; |
30 | uint16_t irq_regs; | 30 | uint16_t irq_regs; |
31 | const char names[4]; | 31 | const char names[4][3]; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static const struct aspeed_gpio_bank aspeed_gpio_banks[] = { | 34 | static const struct aspeed_gpio_bank aspeed_gpio_banks[] = { |
35 | { | 35 | { |
36 | .val_regs = 0x0000, | 36 | .val_regs = 0x0000, |
37 | .irq_regs = 0x0008, | 37 | .irq_regs = 0x0008, |
38 | .names = { 'A', 'B', 'C', 'D' }, | 38 | .names = { "A", "B", "C", "D" }, |
39 | }, | 39 | }, |
40 | { | 40 | { |
41 | .val_regs = 0x0020, | 41 | .val_regs = 0x0020, |
42 | .irq_regs = 0x0028, | 42 | .irq_regs = 0x0028, |
43 | .names = { 'E', 'F', 'G', 'H' }, | 43 | .names = { "E", "F", "G", "H" }, |
44 | }, | 44 | }, |
45 | { | 45 | { |
46 | .val_regs = 0x0070, | 46 | .val_regs = 0x0070, |
47 | .irq_regs = 0x0098, | 47 | .irq_regs = 0x0098, |
48 | .names = { 'I', 'J', 'K', 'L' }, | 48 | .names = { "I", "J", "K", "L" }, |
49 | }, | 49 | }, |
50 | { | 50 | { |
51 | .val_regs = 0x0078, | 51 | .val_regs = 0x0078, |
52 | .irq_regs = 0x00e8, | 52 | .irq_regs = 0x00e8, |
53 | .names = { 'M', 'N', 'O', 'P' }, | 53 | .names = { "M", "N", "O", "P" }, |
54 | }, | 54 | }, |
55 | { | 55 | { |
56 | .val_regs = 0x0080, | 56 | .val_regs = 0x0080, |
57 | .irq_regs = 0x0118, | 57 | .irq_regs = 0x0118, |
58 | .names = { 'Q', 'R', 'S', 'T' }, | 58 | .names = { "Q", "R", "S", "T" }, |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | .val_regs = 0x0088, | 61 | .val_regs = 0x0088, |
62 | .irq_regs = 0x0148, | 62 | .irq_regs = 0x0148, |
63 | .names = { 'U', 'V', 'W', 'X' }, | 63 | .names = { "U", "V", "W", "X" }, |
64 | }, | 64 | }, |
65 | /* | 65 | /* |
66 | * A bank exists for { 'Y', 'Z', "AA", "AB" }, but is not implemented. | 66 | * A bank exists for { 'Y', 'Z', "AA", "AB" }, but is not implemented. |