From patchwork Tue Dec 18 02:31:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuanjia Liu X-Patchwork-Id: 10734599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38D3B6C2 for ; Tue, 18 Dec 2018 02:32:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1966D2A703 for ; Tue, 18 Dec 2018 02:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07D1A2A706; Tue, 18 Dec 2018 02:32:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 759FB2A703 for ; Tue, 18 Dec 2018 02:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rEc6VGGBiSTtviGizInvIk9uLlrsd+XfRgFsxvz7Ol8=; b=QIHcnNwQfDggq8 bqJocWHC7aJksI1zhd2rsXCZ5SU2n7Sjf2qEwr29A8VrLAoIbEz6wSXDcMpNktipTEOMbs833TyoH 5kUbekpSfrBljTB211t6xKkkxKtZRKVgEqLAwuKrLHfZWfReYyULZCxcGXTDI5JIp0+2ftjq0bU6f EtHi8XlBc4Hg3uwqUW3t+k5/62H9IClAyEh0xcTtU13+qIpsHYAxOLSD2sr6JgQ3ZJZ6HuUah/9Uj VjxdtUJulXesUZOEB4bqfhY8dKDI/MbbWtx5/OlBVo63gVna5m2kMWgI1t/0xeHyZwn/Nk+P4TAt/ m5z3X2uVSRq17DUQazJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZ5BV-0006Vk-Mr; Tue, 18 Dec 2018 02:32:37 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZ5BS-0006Uf-0J; Tue, 18 Dec 2018 02:32:36 +0000 X-UUID: 899943ec3ddc4167860c5377a9315dd6-20181218 X-UUID: 899943ec3ddc4167860c5377a9315dd6-20181218 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1124801335; Tue, 18 Dec 2018 10:32:03 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 18 Dec 2018 10:32:01 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 18 Dec 2018 10:32:01 +0800 From: To: , , , , , , Subject: [PATCH v2] pinctrl:mediatek:add judgment conditions Date: Tue, 18 Dec 2018 10:31:22 +0800 Message-ID: <1545100282-15756-1-git-send-email-chuanjia.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181217_183234_208718_0331838A X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, zhiyong.tao@mediatek.com, eddie.huang@mediatek.com, hailong.fan@mediatek.com, Chuanjia Liu Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chuanjia Liu This patch avoid return err when virtual gpio set SMT. Signed-off-by: Chuanjia Liu --- 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;