Commit 0ac0e2e
gpio: rockchip: Stop calling pinctrl for set_direction
commit 7ca497b upstream.
Marking the whole controller as sleeping due to the pinctrl calls in the
.direction_{input,output} callbacks has the unfortunate side effect that
legitimate invocations of .get and .set, which cannot themselves sleep,
in atomic context now spew WARN()s from gpiolib.
However, as Heiko points out, the driver doing this is a bit silly to
begin with, as the pinctrl .gpio_set_direction hook doesn't even care
about the direction, the hook is only used to claim the mux. And sure
enough, the .gpio_request_enable hook exists to serve this very purpose,
so switch to that and remove the problematic business entirely.
Cc: stable@vger.kernel.org
Fixes: 20cf2ae ("gpio: rockchip: mark the GPIO controller as sleeping")
Suggested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/bddc0469f25843ca5ae0cf578ab3671435ae98a7.1769429546.git.robin.murphy@arm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent f69cae1 commit 0ac0e2e
2 files changed
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 166 | | |
174 | 167 | | |
175 | 168 | | |
| |||
593 | 586 | | |
594 | 587 | | |
595 | 588 | | |
596 | | - | |
597 | 589 | | |
598 | 590 | | |
599 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3184 | 3184 | | |
3185 | 3185 | | |
3186 | 3186 | | |
3187 | | - | |
3188 | | - | |
3189 | | - | |
3190 | | - | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
3191 | 3190 | | |
3192 | 3191 | | |
3193 | 3192 | | |
| |||
3201 | 3200 | | |
3202 | 3201 | | |
3203 | 3202 | | |
3204 | | - | |
| 3203 | + | |
3205 | 3204 | | |
3206 | 3205 | | |
3207 | 3206 | | |
| |||
0 commit comments