提交 6e1c3023 编写于 作者: M Maxime Ripard 提交者: Linus Walleij

pinctrl: sunxi: Add macro definition for pinctrl with more than one interrupt

The A31 and A23, unlike the other Allwinner SoCs, have several interrupts banks
and parent interrupts, while the other only have up to 32 interrupts in a
single bank and a single parent interrupt.

Start supporting it by introducing a function macro to declare irq functions
and their banks.
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 645ec714
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
struct sunxi_desc_function { struct sunxi_desc_function {
const char *name; const char *name;
u8 muxval; u8 muxval;
u8 irqbank;
u8 irqnum; u8 irqnum;
}; };
...@@ -139,6 +140,14 @@ struct sunxi_pinctrl { ...@@ -139,6 +140,14 @@ struct sunxi_pinctrl {
.irqnum = _irq, \ .irqnum = _irq, \
} }
#define SUNXI_FUNCTION_IRQ_BANK(_val, _bank, _irq) \
{ \
.name = "irq", \
.muxval = _val, \
.irqbank = _bank, \
.irqnum = _irq, \
}
/* /*
* The sunXi PIO registers are organized as is: * The sunXi PIO registers are organized as is:
* 0x00 - 0x0c Muxing values. * 0x00 - 0x0c Muxing values.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册