Skip to content

Commit

Permalink
pinctrl: sunxi: Add macro definition for pinctrl with more than one i…
Browse files Browse the repository at this point in the history
…nterrupt

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: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Maxime Ripard authored and Linus Walleij committed Jun 19, 2014
1 parent 645ec71 commit 6e1c302
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/pinctrl/sunxi/pinctrl-sunxi.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
struct sunxi_desc_function {
const char *name;
u8 muxval;
u8 irqbank;
u8 irqnum;
};

Expand Down Expand Up @@ -139,6 +140,14 @@ struct sunxi_pinctrl {
.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:
* 0x00 - 0x0c Muxing values.
Expand Down

0 comments on commit 6e1c302

Please sign in to comment.