Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4227332imu; Mon, 24 Dec 2018 19:43:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN6swJo9kC9zkB2Xk9x3OLCS+OYCbwXSCPXx3TMltoF3jzsbIVXMv0N3IZmroD5yPGZCl3n2 X-Received: by 2002:a17:902:7896:: with SMTP id q22mr15358102pll.280.1545709428874; Mon, 24 Dec 2018 19:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545709428; cv=none; d=google.com; s=arc-20160816; b=ycVn+9W6LQhbXj8q2BRITkf+JvSsX7TZkg9LpIYF/Hbn15GvFrNamrG8UAKoe53zAb t8ssum10JTnHbqeBzTMnwkaNKUUYZt1zDlhwL7tZEHZLp9ID1ZUwCSPan8L8I8pL10B6 ioE+uwoXGOH9DoRw8qvqyQSQpBkQ1oG5I0ql2ITigmmjG2s4XQYveDSolcDmBRZIYBFN aPNiwJbYwcTFh5ITtPlsa/01fTtgpg273XYXda+4q7hXyejg/6btj4txJWNdGqo36uN3 7qO2s25Ady+rfukeLDXM/wPLJmgq9pv9Pw3KpH02lNShqdMLeXiuYwpHPNgtHUcELBxD oPAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=ww3JDiuy+OlukEAnrjiPs7bbv5PpbKTQBwEYpySuVaM=; b=LMoQWfwfZKxlM/GhXEATqa4+MpjQGLeU9FL38VWtC3KF9fzgBsEvCtJ18cMX2yTEbh A7fCELlbdfa6Yr+ClqpBc1QDE03JMowt+I5qo+EQIytB9oZNRv7y6puI3zgzuIZ/8lJh ZaD5lcK+hnFbVSyA7wDujsPfgYPrl+CX9ei+GWPTmWC2Li2gR6OmzRfk4u7IUzik+J2Q 3O/YGH6jgXxNwG+A1J5/aZh16pjxnj1HbEGwjlaPtbNq6qj8DdfTLmRgQQoPtFPl2vO1 BDeL1+n1yyf2TPcyZTI7qfZSEaKaSLN615jxou1JD+gJNs2IIAirfneHJ5sBIwt4BHqc M4kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z129si22412898pfz.13.2018.12.24.19.43.04; Mon, 24 Dec 2018 19:43:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725830AbeLYDkp (ORCPT + 99 others); Mon, 24 Dec 2018 22:40:45 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:31214 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725806AbeLYDkp (ORCPT ); Mon, 24 Dec 2018 22:40:45 -0500 X-UUID: a667d26d997f4fc5a6d8be18d49074c8-20181225 X-UUID: a667d26d997f4fc5a6d8be18d49074c8-20181225 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1806135897; Tue, 25 Dec 2018 11:40:36 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 25 Dec 2018 11:40:35 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 25 Dec 2018 11:40:34 +0800 Message-ID: <1545709234.17628.1.camel@mhfsdcap03> Subject: Re: [PATCH v2] pinctrl:mediatek:add judgment conditions From: Chuanjia Liu To: Sean Wang CC: Linus Walleij , Matthias Brugger , "linux-mediatek@lists.infradead.org" , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Zhiyong Tao =?UTF-8?Q?=28=E9=99=B6=E5=BF=97=E5=8B=87=29?=" , "Eddie Huang =?UTF-8?Q?=28=E9=BB=83=E6=99=BA=E5=82=91=29?=" , "Hailong Fan =?UTF-8?Q?=28=E8=8C=83=E6=B5=B7=E9=BE=99=29?=" , "Youlin Pei =?UTF-8?Q?=28=E8=A3=B4=E5=8F=8B=E6=9E=97=29?=" Date: Tue, 25 Dec 2018 11:40:34 +0800 In-Reply-To: References: <1545100282-15756-1-git-send-email-chuanjia.liu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-12-23 at 02:50 +0800, Sean Wang wrote: > On Mon, Dec 17, 2018 at 6:32 PM wrote: > > > > I thought the subject still is much general, it should be further > improved with something like "add EINT support to virtual GPIOs" and > should say more about what virtual GPIOs means by MTKers in the patch > description because "virtual" is a usual term used throughout the > kernel and that would easily cause others to fail to interpret > correctly. > Thank you for your advice,I will modify subject and description. > > 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. > > + */ > > I'd prefer to the comments as the below > > /* > SMT is supposed to be supported by every real GPIO and doesn't support > virtual GPIOs, so the extra condition err != -ENOTSUPP is just for > adding EINT support to these virtual GPIOs. It should add an extra > flag in the pin descriptor when more pins with distinctive > characteristic come out. > */ > Thank you for your advice,I will modify comments. > > + if (err && err != -ENOTSUPP) > > return err; > > > > return 0; > > -- > > 2.19.1 > >