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>
This commit is contained in:
parent
47b03ca903
commit
7153f8ef67
|
@ -28,39 +28,39 @@ struct aspeed_gpio {
|
||||||
struct aspeed_gpio_bank {
|
struct aspeed_gpio_bank {
|
||||||
uint16_t val_regs;
|
uint16_t val_regs;
|
||||||
uint16_t irq_regs;
|
uint16_t irq_regs;
|
||||||
const char names[4];
|
const char names[4][3];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct aspeed_gpio_bank aspeed_gpio_banks[] = {
|
static const struct aspeed_gpio_bank aspeed_gpio_banks[] = {
|
||||||
{
|
{
|
||||||
.val_regs = 0x0000,
|
.val_regs = 0x0000,
|
||||||
.irq_regs = 0x0008,
|
.irq_regs = 0x0008,
|
||||||
.names = { 'A', 'B', 'C', 'D' },
|
.names = { "A", "B", "C", "D" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.val_regs = 0x0020,
|
.val_regs = 0x0020,
|
||||||
.irq_regs = 0x0028,
|
.irq_regs = 0x0028,
|
||||||
.names = { 'E', 'F', 'G', 'H' },
|
.names = { "E", "F", "G", "H" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.val_regs = 0x0070,
|
.val_regs = 0x0070,
|
||||||
.irq_regs = 0x0098,
|
.irq_regs = 0x0098,
|
||||||
.names = { 'I', 'J', 'K', 'L' },
|
.names = { "I", "J", "K", "L" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.val_regs = 0x0078,
|
.val_regs = 0x0078,
|
||||||
.irq_regs = 0x00e8,
|
.irq_regs = 0x00e8,
|
||||||
.names = { 'M', 'N', 'O', 'P' },
|
.names = { "M", "N", "O", "P" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.val_regs = 0x0080,
|
.val_regs = 0x0080,
|
||||||
.irq_regs = 0x0118,
|
.irq_regs = 0x0118,
|
||||||
.names = { 'Q', 'R', 'S', 'T' },
|
.names = { "Q", "R", "S", "T" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.val_regs = 0x0088,
|
.val_regs = 0x0088,
|
||||||
.irq_regs = 0x0148,
|
.irq_regs = 0x0148,
|
||||||
.names = { 'U', 'V', 'W', 'X' },
|
.names = { "U", "V", "W", "X" },
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* A bank exists for { 'Y', 'Z', "AA", "AB" }, but is not implemented.
|
* A bank exists for { 'Y', 'Z', "AA", "AB" }, but is not implemented.
|
||||||
|
|
Loading…
Reference in New Issue