Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2189297imu; Sun, 16 Dec 2018 19:24:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/WyyiNE53zAvaiYCHaP+bsVJNTn+O/vOKSTrIIIOIctCpf2AfMIWJ0osKl0mp8qgx/cFBJ8 X-Received: by 2002:a17:902:14e:: with SMTP id 72mr11369695plb.287.1545017070079; Sun, 16 Dec 2018 19:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545017070; cv=none; d=google.com; s=arc-20160816; b=GNFZKMezcYQs9YlINhKDi/oxd+r3V4xx4oK/grAWvrT8sOyH19z4rrnBhl4aoD3bws t33uQBtnuFxNprKb45ApBp9bxofGZAqfwSYo55Qtg/DZOkOgmIJFSlksMgtXE92fzumk 2c+20OYOfDxth0VNs2et7/iwjyahS0+zeszG1mrUeUy/zYrFeFEMAUn7z5/M6bGhmyEp N5Av7/pDqR3dQtXvPzVN3y7+a/3W090BjyN7oce5Hzgm/MtR8IJkuxXMrn7pdmb9hZVR 4HGw1blfp+XyiKiuVaehjm9jR99Q6TG1ZETL58OWqG+36CLOQRFcFW28fvYDkBOhDku/ 6TAw== 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=Go5ZpYV2nfisdte7ZyZ10O53mCV5iv5+G8b4k1ftkC0=; b=pEGT/cou5mnCUis9XQ1Ivm4ZDAZCLpqmMDMLSeMbAlx0eXJIJTFZCMxO8kCnOXiKi8 8HIkbS1rcbppGd0Q5PeiTZExzxPeIXAyVZ34wRL69fhkEa5pt+5xsS3L8kN2ATi0rK7x Xou4uYXh4sWjErFlysRAMlgZFH62hlMfxnbe6Jmci9i8sBgvnnU3EI3Yvb1I74LM8DYq 3l5rQT50mBmrdrqTMiMIo3qXKClGjJUJh1OX6Khjc2GfBD/uQaZYdYexFaAvEDw2QNJp cspdTe7hWpg94Ce42P5zRExKpcxnxFM9hSY1d3u4PGov0bDNTuIhZfJRGBABZbQ0mYRO eehg== 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 d9si10288314pgb.105.2018.12.16.19.24.14; Sun, 16 Dec 2018 19:24:30 -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 S1726374AbeLQDTh (ORCPT + 99 others); Sun, 16 Dec 2018 22:19:37 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:30235 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726267AbeLQDTh (ORCPT ); Sun, 16 Dec 2018 22:19:37 -0500 X-UUID: d027a9763a93496286e9c67df70b3b12-20181217 X-UUID: d027a9763a93496286e9c67df70b3b12-20181217 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 527681582; Mon, 17 Dec 2018 11:19:30 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Dec 2018 11:19:29 +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; Mon, 17 Dec 2018 11:19:28 +0800 Message-ID: <1545016768.29293.13.camel@mhfsdcap03> Subject: Re: [PATCH] eint: add gpio vritual number select From: Chuanjia Liu To: Sean Wang CC: Linus Walleij , Matthias Brugger , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Hongkun Cao =?UTF-8?Q?=28=E6=9B=B9=E6=B4=AA=E5=9D=A4=29?= , Youlin Pei =?UTF-8?Q?=28=E8=A3=B4=E5=8F=8B=E6=9E=97=29?= , Eddie Huang =?UTF-8?Q?=28=E9=BB=83=E6=99=BA=E5=82=91=29?= , Zhiyong Tao =?UTF-8?Q?=28=E9=99=B6=E5=BF=97=E5=8B=87=29?= , Hailong Fan =?UTF-8?Q?=28=E8=8C=83=E6=B5=B7=E9=BE=99=29?= Date: Mon, 17 Dec 2018 11:19:28 +0800 In-Reply-To: References: <1544693783-25079-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 Fri, 2018-12-14 at 03:51 +0800, Sean Wang wrote: > And the subject should be also corrected with prefix starting with > "pinctrl: mediatek:", typo fixup, and having a better subject close to > the content. I will change it in next patch. > On Thu, Dec 13, 2018 at 1:36 AM wrote: > > > > From: Chuanjia Liu > > > > This patch add gpio vritual number select,avoid virtual gpio set SMT. > > > > Signed-off-by: Chuanjia Liu > > --- > > drivers/pinctrl/mediatek/mtk-eint.h | 1 + > > drivers/pinctrl/mediatek/pinctrl-mt8183.c | 1 + > > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 9 ++++++--- > > 3 files changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/pinctrl/mediatek/mtk-eint.h b/drivers/pinctrl/mediatek/mtk-eint.h > > index 48468d0..c16beaf 100644 > > --- a/drivers/pinctrl/mediatek/mtk-eint.h > > +++ b/drivers/pinctrl/mediatek/mtk-eint.h > > @@ -37,6 +37,7 @@ struct mtk_eint_hw { > > u8 ports; > > unsigned int ap_num; > > unsigned int db_cnt; > > + unsigned int vir_start; > > }; > > > > struct mtk_eint; > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8183.c b/drivers/pinctrl/mediatek/pinctrl-mt8183.c > > index 6262fd3..bbeafd3 100644 > > --- a/drivers/pinctrl/mediatek/pinctrl-mt8183.c > > +++ b/drivers/pinctrl/mediatek/pinctrl-mt8183.c > > @@ -497,6 +497,7 @@ > > .ports = 6, > > .ap_num = 212, > > .db_cnt = 13, > > + .vir_start = 180, > > }; > > > > static const struct mtk_pin_soc mt8183_data = { > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > index 4a9e0d4..ca3bae1 100644 > > --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > @@ -289,9 +289,12 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n) > > if (err) > > return err; > > > > - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE); > > - if (err) > > - return err; > > + if (gpio_n < hw->eint->hw->vir_start) { > > + err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, > > + MTK_ENABLE); > > + if (err) > > + return err; > > + } > > > > return 0; > > } > > -- > > 1.7.9.5