Commit 70f8915
pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown
Fixes kernel hang during boot due to inability to set up IRQ on AXP313a.
The issue is caused by gpiochip_lock_as_irq() which is failing when gpio
is in uninitialized state.
Solution is to set pinmux to GPIO INPUT in
sunxi_pinctrl_irq_request_resources() if it wasn't initialized
earlier.
Tested on Orange Pi Zero 3.
Fixes: 01e10d0 ("pinctrl: sunxi: Implement gpiochip::get_direction()")
Reviewed-by: Andre Przywara <[email protected]>
Reviewed-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Michal Piekos <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>1 parent 42e0668 commit 70f8915
2 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1095 | 1098 | | |
1096 | 1099 | | |
1097 | 1100 | | |
1098 | 1101 | | |
1099 | 1102 | | |
1100 | 1103 | | |
1101 | 1104 | | |
1102 | | - | |
1103 | | - | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1104 | 1120 | | |
1105 | 1121 | | |
1106 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
0 commit comments