Skip to content

Commit 8f9f64c

Browse files
lscorcialinusw
authored andcommitted
pinctrl: mediatek: common: Fix probe failure for devices without EINT
Some pinctrl devices like mt6397 or mt6392 don't support EINT at all, but the mtk_eint_init function is always called and returns -ENODEV, which then bubbles up and causes probe failure. To address this only call mtk_eint_init if EINT pins are present. Tested on Xiaomi Mi Smart Clock x04g (mt6392). Fixes: e46df23 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit") Signed-off-by: Luca Leonardo Scorcia <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent c8cfeb4 commit 8f9f64c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,9 +1135,12 @@ int mtk_pctrl_init(struct platform_device *pdev,
11351135
goto chip_error;
11361136
}
11371137

1138-
ret = mtk_eint_init(pctl, pdev);
1139-
if (ret)
1140-
goto chip_error;
1138+
/* Only initialize EINT if we have EINT pins */
1139+
if (data->eint_hw.ap_num > 0) {
1140+
ret = mtk_eint_init(pctl, pdev);
1141+
if (ret)
1142+
goto chip_error;
1143+
}
11411144

11421145
return 0;
11431146

0 commit comments

Comments
 (0)