linux/drivers/pinctrl/mediatek
Tzung-Bi Shih 56ab29ec6f pinctrl: mediatek: use spin lock in mtk_rmw
Commit 42a46434e9 ("pinctrl: add lock in mtk_rmw function.") uses
mutex lock in mtk_rmw.  However the function is possible called from
atomic context.

For example call trace:
  mutex_lock+0x28/0x64
  mtk_rmw+0x38/0x80
  [snip]
  max98357a_daiops_trigger+0x8c/0x9c
  soc_pcm_trigger+0x5c/0x10c

The max98357a_daiops_trigger() could run in either atomic or non-atomic
context.  As a result, dmesg shows some similar messages: "BUG: sleeping
function called from invalid context at kernel/locking/mutex.c:254".

Uses spin lock in mtk_rmw instead.

Fixes: 42a46434e9 ("pinctrl: add lock in mtk_rmw function.")
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210419093449.3125704-1-tzungbi@google.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2021-04-22 01:53:29 +02:00
..
Kconfig pinctrl: add pinctrl driver on mt8195 2021-04-22 01:53:02 +02:00
Makefile pinctrl: add pinctrl driver on mt8195 2021-04-22 01:53:02 +02:00
mtk-eint.c pinctrl: mediatek: Fix trigger type setting follow for unexpected interrupt 2021-02-15 05:52:01 +01:00
mtk-eint.h pinctrl: mediatek: mark dummy helpers as 'static inline' 2018-09-28 09:27:04 +02:00
pinctrl-moore.c pinctrl: mediatek: use spin lock in mtk_rmw 2021-04-22 01:53:29 +02:00
pinctrl-moore.h pinctrl: mtk: Fix up GPIO includes 2018-09-18 16:38:27 -07:00
pinctrl-mt2701.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mt2712.c pinctrl: mediatek: remove unused fields in struct mtk_eint_hw 2018-05-24 09:40:10 +02:00
pinctrl-mt6397.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mt6765.c pinctrl: mediatek: make MediaTek MT6765 pinctrl ready for buiding loadable module 2020-04-16 09:59:11 +02:00
pinctrl-mt6779.c pinctrl: mediatek: add mt6779 eint support 2020-08-04 01:29:10 +02:00
pinctrl-mt6797.c pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC 2018-11-15 11:05:54 +01:00
pinctrl-mt7622.c pinctrl: mt7622: drop pwm ch7 as mt7622 only has 6 channels 2020-11-10 14:58:14 +01:00
pinctrl-mt7623.c pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on 2018-09-18 14:53:22 -07:00
pinctrl-mt7629.c pinctrl: mediatek: add pinctrl support for MT7629 SoC 2018-11-19 15:40:26 +01:00
pinctrl-mt8127.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mt8135.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mt8167.c pinctrl: mediatek: Add MT8167 Pinctrl driver 2020-09-27 11:20:09 +02:00
pinctrl-mt8173.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mt8183.c pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage 2020-02-14 11:36:49 +01:00
pinctrl-mt8192.c pinctrl: mediatek: Add pinctrl driver for mt8192 2020-08-27 10:50:57 +02:00
pinctrl-mt8195.c pinctrl: add drive for I2C related pins on MT8195 2021-04-22 01:53:02 +02:00
pinctrl-mt8516.c pinctrl: mediatek: Add MT8516 Pinctrl driver 2019-05-03 07:53:13 +01:00
pinctrl-mtk-common-v2.c pinctrl: mediatek: use spin lock in mtk_rmw 2021-04-22 01:53:29 +02:00
pinctrl-mtk-common-v2.h pinctrl: mediatek: use spin lock in mtk_rmw 2021-04-22 01:53:29 +02:00
pinctrl-mtk-common.c pinctrl: Use new GPIO_LINE_DIRECTION 2020-02-21 15:19:42 +01:00
pinctrl-mtk-common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt2701.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt2712.h pinctrl: mediatek: Use the correct style for SPDX License Identifier 2019-12-12 11:30:33 +01:00
pinctrl-mtk-mt6397.h pinctrl: mtk: fix check warnings. 2018-03-26 10:58:33 +02:00
pinctrl-mtk-mt6765.h pinctrl: mediatek: add MT6765 pinctrl driver 2018-09-21 09:12:55 -07:00
pinctrl-mtk-mt6779.h pinctrl: mediatek: add pinctrl support for MT6779 SoC 2020-08-04 01:29:09 +02:00
pinctrl-mtk-mt6797.h pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC 2018-11-15 11:05:54 +01:00
pinctrl-mtk-mt8127.h pinctrl: mtk: fix check warnings. 2018-03-26 10:58:33 +02:00
pinctrl-mtk-mt8135.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt8167.h pinctrl: mediatek: Add MT8167 Pinctrl driver 2020-09-27 11:20:09 +02:00
pinctrl-mtk-mt8173.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt8183.h pinctrl: mediatek: add MT8183 pinctrl driver 2018-09-18 14:53:29 -07:00
pinctrl-mtk-mt8192.h pinctrl: mediatek: Add pinctrl driver for mt8192 2020-08-27 10:50:57 +02:00
pinctrl-mtk-mt8195.h pinctrl: add pinctrl driver on mt8195 2021-04-22 01:53:02 +02:00
pinctrl-mtk-mt8516.h pinctrl: mediatek: Add MT8516 Pinctrl driver 2019-05-03 07:53:13 +01:00
pinctrl-paris.c pinctrl: mediatek: use spin lock in mtk_rmw 2021-04-22 01:53:29 +02:00
pinctrl-paris.h pinctrl: mediatek: Add support for pin configuration dump via debugfs. 2020-02-14 11:38:26 +01:00