kernel: bump 5.15 to 5.15.71
[openwrt/staging/dedeckeh.git] / target / linux / mpc85xx / patches-5.10 / 110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch
1 From 29af30435022442ec4eccf3166956b8e0b8a2134 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
3 Date: Mon, 5 Sep 2022 23:13:47 +0200
4 Subject: [PATCH] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type
5 in mpc85xx
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support
11 mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in
12 mpc512x via falling edge type. Do same for mpc85xx which support was added
13 in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio").
14
15 Fixes probing of lm90 hwmon driver on mpc85xx based board which use level
16 interrupt. Without it kernel prints error and refuse lm90 to work:
17
18 [ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xxx_irq_set_type+0x0/0xf8)
19 [ 15.267168] lm90 0-004c: cannot request IRQ 49
20 [ 15.272708] lm90: probe of 0-004c failed with error -22
21
22 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio")
23 Signed-off-by: Pali Rohár <pali@kernel.org>
24 ---
25 drivers/gpio/gpio-mpc8xxx.c | 1 +
26 1 file changed, 1 insertion(+)
27
28 --- a/drivers/gpio/gpio-mpc8xxx.c
29 +++ b/drivers/gpio/gpio-mpc8xxx.c
30 @@ -169,6 +169,7 @@ static int mpc8xxx_irq_set_type(struct i
31
32 switch (flow_type) {
33 case IRQ_TYPE_EDGE_FALLING:
34 + case IRQ_TYPE_LEVEL_LOW:
35 raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
36 gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR,
37 gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR)