Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1253910imu; Thu, 13 Dec 2018 11:54:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/V333+gjWioNCEMAu5Orb/thtWtNAFuZkWaVjnb7hpFMKaZUurXpFSWMCx7BjPeJvANTcDO X-Received: by 2002:a62:5c1:: with SMTP id 184mr105782pff.165.1544730879770; Thu, 13 Dec 2018 11:54:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544730879; cv=none; d=google.com; s=arc-20160816; b=yYSBHcSMtKT+TA5qvEAJrtxDDV4/GY1wr7ghj99/q8I3ANodl5dEfRFBxWkxZgdK5V c6xB7oXdEWT4uTAq1GEWGm4AJGT0LibrrpalN6SpcElWJxgm8fjtx/+m7+8H1d1ICOYR N9NNrq4FHzbELlMC41xScwor/IwYwHqR5Pp9Spn9TVfeTLmH4fz1nEsg8fzWvvEQ50L0 lsSBV34ajVycQ3RZuLHitLgQ2S61UcgGyQHvQDvoyx0nHkK3Xq7PYlY9VgiZ1vJ6I+cr e+5+hanyD+oY9acHbW+fb3tWLoilQ85N14cG+J5Umu1uocRDBF892O+HzvF8Oc1klgr+ O1UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IinFPVmGeujkI7awXQioD3CTCzuQ/xfjnGMAwcCs/C8=; b=z6Ttc4KspblwkhAU0+dTs8WB5tGie7+LRMx1iTXPRIy1UJ5N58w1hFDPXQT6VcA7nZ XnDtD6ymCFVD9pMQfGVxzgj8BSKy7+H/yrnLrLd4C+KendlRBMOGtPpNd35oTB68P7l4 TTlFB8ydygKOfxngf3VjBinJKuNiWgeCG1sFTQLGYhjFB+GL0Buau6ISstngiq0Fp5Cf Wws2xA0KFdTo5ZD4heBGw1iEDg49rjjKlCC9mYQPFxc3a0JDYVZJ8CXJCK+Pcr5SLhrJ HAmjeWDPl4w6z2pLMFM82kFoxXnhxsAV0rLJxQlKnLYf7Iq/J+rzPQFoUW3yNuUfVGVR to+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xbp270yx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l38si2294186plb.48.2018.12.13.11.54.24; Thu, 13 Dec 2018 11:54:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Xbp270yx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728716AbeLMTwQ (ORCPT + 99 others); Thu, 13 Dec 2018 14:52:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:38028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727707AbeLMTwP (ORCPT ); Thu, 13 Dec 2018 14:52:15 -0500 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 023EB20880 for ; Thu, 13 Dec 2018 19:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544730734; bh=2i/AYWkFpEOlg+61T3YaTh6wAxl5PxRc41maMyWJSdI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Xbp270yxIQfjK7fnpEcEFLXY3rrvmtoYlTjrFPOI5D38VqBBTcmFIfNne21rQ63nf R4CuDV1mPLjeEDgGM0kb6o05XcWIwee42ropA9edH0NXFSCRJFYe0AtJKO1UpsMNRD ChbWegpQtOd7VMCL9bTg/zcSfY6YaU5x/HGq/4e0= Received: by mail-wm1-f53.google.com with SMTP id y139so3541999wmc.5 for ; Thu, 13 Dec 2018 11:52:13 -0800 (PST) X-Gm-Message-State: AA+aEWYvQc35tEuDoLpWpCT820UxjOFSHdz5jb8sRukQD6wbpcqGwZ34 317A1u2mB7nCHHjgwR73kHaJgPOipT0yYi2V+oI= X-Received: by 2002:a1c:4d12:: with SMTP id o18mr749046wmh.92.1544730732499; Thu, 13 Dec 2018 11:52:12 -0800 (PST) MIME-Version: 1.0 References: <1544693783-25079-1-git-send-email-chuanjia.liu@mediatek.com> In-Reply-To: <1544693783-25079-1-git-send-email-chuanjia.liu@mediatek.com> From: Sean Wang Date: Thu, 13 Dec 2018 11:51:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] eint: add gpio vritual number select To: chuanjia.liu@mediatek.com Cc: Linus Walleij , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hongkun.cao@mediatek.com, youlin.pei@mediatek.com, eddie.huang@mediatek.com, zhiyong.tao@mediatek.com, hailong.fan@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org And the subject should be also corrected with prefix starting with "pinctrl: mediatek:", typo fixup, and having a better subject close to the content. 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