Commit 466a158e authored by hongkun.cao's avatar hongkun.cao Committed by Sasha Levin

pinctrl: mediatek: fix dual-edge code defect

[ Upstream commit 5edf673d ]

When a dual-edge irq is triggered, an incorrect irq will be reported on
condition that the external signal is not stable and this incorrect irq
has been registered.
Correct the register offset.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarHongkun Cao <hongkun.cao@mediatek.com>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 3de5aac3
......@@ -1030,9 +1030,10 @@ static void mtk_eint_irq_handler(unsigned irq, struct irq_desc *desc)
const struct mtk_desc_pin *pin;
chained_irq_enter(chip, desc);
for (eint_num = 0; eint_num < pctl->devdata->ap_num; eint_num += 32) {
for (eint_num = 0;
eint_num < pctl->devdata->ap_num;
eint_num += 32, reg += 4) {
status = readl(reg);
reg += 4;
while (status) {
offset = __ffs(status);
index = eint_num + offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment