From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Luca Leonardo Scorcia <l.scorcia@gmail.com>,
linux-mediatek@lists.infradead.org
Cc: Sean Wang <sean.wang@kernel.org>,
Linus Walleij <linusw@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pinctrl: mediatek: common: Fix probe failure for devices without EINT
Date: Tue, 17 Mar 2026 15:28:31 +0100 [thread overview]
Message-ID: <4e120931-9ae0-4332-aeb7-ab11926c4e00@collabora.com> (raw)
In-Reply-To: <20260317110249.391552-1-l.scorcia@gmail.com>
Il 17/03/26 12:02, Luca Leonardo Scorcia ha scritto:
> 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: e46df235b4e6 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit")
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
That's right. Not all do - and the ones that don't have eint support also won't
have the pm ops, so no further check is required.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> index d6a46fe0cda8..3f518dce6d23 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> @@ -1135,9 +1135,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;
>
next prev parent reply other threads:[~2026-03-17 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 11:02 [PATCH] pinctrl: mediatek: common: Fix probe failure for devices without EINT Luca Leonardo Scorcia
2026-03-17 14:28 ` AngeloGioacchino Del Regno [this message]
2026-03-19 18:52 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e120931-9ae0-4332-aeb7-ab11926c4e00@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=l.scorcia@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox