From: <chuanjia.liu@mediatek.com>
To: <sean.wang@kernel.org>, <linus.walleij@linaro.org>,
<matthias.bgg@gmail.com>, <linux-mediatek@lists.infradead.org>,
<linux-gpio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: youlin.pei@mediatek.com, zhiyong.tao@mediatek.com,
eddie.huang@mediatek.com, hailong.fan@mediatek.com,
Chuanjia Liu <Chuanjia.Liu@mediatek.com>
Subject: [PATCH v2] pinctrl:mediatek:add judgment conditions
Date: Tue, 18 Dec 2018 10:31:22 +0800 [thread overview]
Message-ID: <1545100282-15756-1-git-send-email-chuanjia.liu@mediatek.com> (raw)
From: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
This patch avoid return err when virtual gpio set SMT.
Signed-off-by: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
---
change note:
v2 : 1. delete virtual gpio number
2. add judgment conditions
---
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 4a9e0d4c2bbc..a576e417744a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -290,7 +290,11 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
return err;
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
- if (err)
+
+ /* SMT doesn't support virtual GPIO, add err != -ENOTSUPP is used for
+ * avoid return err when virtual gpio set SMT.
+ */
+ if (err && err != -ENOTSUPP)
return err;
return 0;
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2018-12-18 2:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 2:31 chuanjia.liu [this message]
2018-12-22 18:50 ` [PATCH v2] pinctrl:mediatek:add judgment conditions Sean Wang
2018-12-25 3:40 ` Chuanjia Liu
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=1545100282-15756-1-git-send-email-chuanjia.liu@mediatek.com \
--to=chuanjia.liu@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=hailong.fan@mediatek.com \
--cc=linus.walleij@linaro.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 \
--cc=youlin.pei@mediatek.com \
--cc=zhiyong.tao@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).