mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 16:29:05 +00:00
pinctrl: sunxi: Fix interrupt register offset calculation
This fixing setting the interrupt type for eints >= 8. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d82f94013a
commit
ef5aff05f1
@ -511,7 +511,7 @@ static inline u32 sunxi_pull_offset(u16 pin)
|
||||
|
||||
static inline u32 sunxi_irq_cfg_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CFG_IRQ_PER_REG;
|
||||
u8 reg = irq / IRQ_CFG_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CFG_REG;
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ static inline u32 sunxi_irq_cfg_offset(u16 irq)
|
||||
|
||||
static inline u32 sunxi_irq_ctrl_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CTRL_IRQ_PER_REG;
|
||||
u8 reg = irq / IRQ_CTRL_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CTRL_REG;
|
||||
}
|
||||
|
||||
@ -535,7 +535,7 @@ static inline u32 sunxi_irq_ctrl_offset(u16 irq)
|
||||
|
||||
static inline u32 sunxi_irq_status_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_STATUS_IRQ_PER_REG;
|
||||
u8 reg = irq / IRQ_STATUS_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_STATUS_REG;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user