Skip to content

Commit 39c4dbe

Browse files
Hanks-Chenlinusw
authored andcommitted
pinctrl: mediatek: check mtk_is_virt_gpio input parameter
check mtk_is_virt_gpio input parameter, virtual gpio need to support eint mode. add error handler for the ko case to fix this boot fail: pc : mtk_is_virt_gpio+0x20/0x38 [pinctrl_mtk_common_v2] lr : mtk_gpio_get_direction+0x44/0xb0 [pinctrl_paris] Fixes: edd5464 ("pinctrl: mediatek: avoid virtual gpio trying to set reg") Signed-off-by: Hanks Chen <[email protected]> Acked-by: Sean Wang <[email protected]> Singed-off-by: Jie Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 5d8ff95 commit 39c4dbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ bool mtk_is_virt_gpio(struct mtk_pinctrl *hw, unsigned int gpio_n)
259259

260260
desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio_n];
261261

262+
/* if the GPIO is not supported for eint mode */
263+
if (desc->eint.eint_m == NO_EINT_SUPPORT)
264+
return virt_gpio;
265+
262266
if (desc->funcs && !desc->funcs[desc->eint.eint_m].name)
263267
virt_gpio = true;
264268

0 commit comments

Comments
 (0)