From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60D78425CEC; Tue, 31 Mar 2026 16:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774975733; cv=none; b=EbebYh2twuxVP0sXuoXOJZqU3chMaTOfJRON6aQhjHOmD5UL67eYkHmraZJyYTIxa4n4fhD9Ksd0LoL4UkV1nhOmTD4YNkeMv783BfXsXLcMmDw3Qre0U/sMNzl2scOablAcF51UiK0SW1dRaWLDoT8aHV8dguhDk801gVzAkLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774975733; c=relaxed/simple; bh=qwvhIRB7FUb14ZEIWyIvfGSzjY33kTYBuF3UZkfdmqI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lpy5UvEyc3gj1ARi2eC2NIYGB3+t7r/5avt6RCggPuEdcz4CWo4Mcqn+mr6bS3Wmr93dvjs6WE8IYv16UFtfHHEuuLtUUefPrwwzXW7N9SsWRujNdGHq0dkRcqKoHPXKKW20IDsEPdhL7yDcxOhku2oSY0Rr4Fc4smKga4HAyWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SArjjmPy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SArjjmPy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95870C19423; Tue, 31 Mar 2026 16:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774975732; bh=qwvhIRB7FUb14ZEIWyIvfGSzjY33kTYBuF3UZkfdmqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SArjjmPygWRbIYbXNo/3+Hde16K8XBpoR3I2ZkYOg9gKZTUl+4+Iak+gTCz+4mKbL PHV1crQWLYJ0W0OyVoahDNK4+qTknEXUPpowrYauLCzPdHX4MCz4dFHjfW7DdTI3bz lUGr3Nkbb7g8/076v9Hep3XF5vpPRHj4Px7/aggg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luca Leonardo Scorcia , AngeloGioacchino Del Regno , Linus Walleij , Sasha Levin Subject: [PATCH 6.12 064/244] pinctrl: mediatek: common: Fix probe failure for devices without EINT Date: Tue, 31 Mar 2026 18:20:14 +0200 Message-ID: <20260331161744.052482992@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161741.651718120@linuxfoundation.org> References: <20260331161741.651718120@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luca Leonardo Scorcia [ 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: e46df235b4e6 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit") Signed-off-by: Luca Leonardo Scorcia Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- 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 91edb539925a4..e5d6dc6b0069f 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1124,9 +1124,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; -- 2.51.0