mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 12:21:01 +00:00
pinctrl: mediatek: common: Fix probe failure for devices without EINT
[ Upstream commit 8f9f64c8f90dca07d3b9f1d7ce5d34ccd246c9dd ]
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: e46df235b4 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit")
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
committed by
Ulrich Hecht
parent
c026fd39d3
commit
8e1ba1e046
@ -1118,9 +1118,12 @@ int mtk_pctrl_init(struct platform_device *pdev,
|
||||
goto chip_error;
|
||||
}
|
||||
|
||||
ret = mtk_eint_init(pctl, pdev);
|
||||
if (ret)
|
||||
goto chip_error;
|
||||
/* Only initialize EINT if we have EINT pins */
|
||||
if (data->eint_hw.ap_num > 0) {
|
||||
ret = mtk_eint_init(pctl, pdev);
|
||||
if (ret)
|
||||
goto chip_error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user