Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2533059pxk; Sun, 27 Sep 2020 11:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOzi2Z1T5h2QUh4CcXdeyZ87RQs2+hl3lONf7jwshL+m35psFcoKsts3Z5WLk4r/vTwQB4 X-Received: by 2002:a17:906:5f96:: with SMTP id a22mr12862283eju.335.1601230277355; Sun, 27 Sep 2020 11:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601230277; cv=none; d=google.com; s=arc-20160816; b=nqJjBUb5GmHME++LGWc2MqnL6TV1+ihA2MIxc3m48ail0w9n2kVFQ4sisRVk6ouA8C r6gI/5ngCsKtcY+lQPCIzvBUPGK4K7qw+NCRXkna7xF2XX1LzYjX9Xeb1xY0SFR8X0YI 57d66nIjqw8GR9HowPepkRQSXfC6SP8jMQe45NO8VjJyslEzg/19PWGtqKkU77SYXS+Q GxVaqhn/0ua6BAmg26OELMvp2wdCI05M0/7k18CowZuyCd9loz1OoHbuPhRYyR8gtGS1 1eeVs8mYwQ+kCJ6Wqzt4g4K1IbF0Y//EKrCevMIfA6HGplu28wb7UnirB1sN0dKTi4hW tw0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+7BiiQR5EUjU/1rlt2qI+PurcdzijeZLNdOOWBxEpxI=; b=UXTQZZGS5mBawoCcEdMvRHqlo3GwwWba+nE0pECvpGQnbMzUOvfLnBK2Smqb3tCGKe h7L/G2shfJPZbq3dsIrk8mnjAksR2i6H2xvyAqekfgXFwZr/1Jru7OE4BK0zypSDbTAN uOiRL3665rN1AStpcCbFC35c4IavGzar2zFIvJ9/G6vXI44tJ9VG54IZ9+lFG/5ccMx9 gFRxHwTgviNZgbzD4BfV/TYE5eqyAGXoYvlBCh64uwftnQ+cjcOJukPR73JE8v7b+mWD 8E1L7IiSYJtAjz8rZeWZoIoh4DGwdcfCTzFmVoy5C57fI3uxLlwqLIO73pbciJAatOkd GbRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+f9PBYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d26si6159619edu.514.2020.09.27.11.10.53; Sun, 27 Sep 2020 11:11:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+f9PBYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726672AbgI0SH5 (ORCPT + 99 others); Sun, 27 Sep 2020 14:07:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:40786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbgI0SH5 (ORCPT ); Sun, 27 Sep 2020 14:07:57 -0400 Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) (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 E8F8723A31; Sun, 27 Sep 2020 18:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601230077; bh=vsE9X3eOgp7dHrsjtGKh2H/Hys4APfGgXPzjOy78+jo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V+f9PBYVKnfawmN5ojU0YWt7R+WuJrseSZJvMh9s+F98TeQF9x1d+dq6cq+63T0eR xGWZED7d1UupRbRs7p8uANEKo3fyKpqG0FFv1CNxJX/l8937FnRJIUeDMliAUp7EAY BhszQvEXrh70MsotsMlw2Hqx3iKpfWm3bMUAYa1s= Received: by mail-il1-f181.google.com with SMTP id m9so2484496ila.10; Sun, 27 Sep 2020 11:07:56 -0700 (PDT) X-Gm-Message-State: AOAM530mdL1OkBFVHaqfA2mn+4FzTQ1SW2oMID4DkCLiqzMozQuWlnSv BAzPeYTl8eZvAF9r2JOcUc41GBSnYkXSxkUQpQo= X-Received: by 2002:a92:d842:: with SMTP id h2mr7981119ilq.176.1601230076381; Sun, 27 Sep 2020 11:07:56 -0700 (PDT) MIME-Version: 1.0 References: <1597922546-29633-1-git-send-email-hanks.chen@mediatek.com> <1601038258.15065.4.camel@mtkswgap22> In-Reply-To: <1601038258.15065.4.camel@mtkswgap22> From: Sean Wang Date: Sun, 27 Sep 2020 11:07:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] pinctrl: mediatek: check mtk_is_virt_gpio input parameter To: Hanks Chen Cc: Matthias Brugger , Linus Walleij , "moderated list:ARM/Mediatek SoC support" , "open list:GPIO SUBSYSTEM" , linux-arm Mailing List , lkml , CC Hwang , sin_jieyang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 5:51 AM Hanks Chen wrote: > > Hi Sean & Linux & Matthias, > > Please kindly let me know your comments about this fixes patch. > Thanks > Acked-by: Sean Wang > Regards, > Hanks > > > On Thu, 2020-08-20 at 19:22 +0800, Hanks Chen wrote: > > check mtk_is_virt_gpio input parameter, > > virtual gpio need to support eint mode. > > > > add error handler for the ko case > > to fix this boot fail: > > pc : mtk_is_virt_gpio+0x20/0x38 [pinctrl_mtk_common_v2] > > lr : mtk_gpio_get_direction+0x44/0xb0 [pinctrl_paris] > > > > Fixes: edd546465002 ("pinctrl: mediatek: avoid virtual gpio trying to set reg") > > Singed-off-by: Jie Yang > > Signed-off-by: Hanks Chen > > > > --- > > Changes since v1: > > - update Singed-off-by > > - align with pinctrl/mediatek/pinctrl-mtk-mt*.h > > > > --- > > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > index c53e2c391e32..a485d79f51a1 100644 > > --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > > @@ -259,6 +259,10 @@ bool mtk_is_virt_gpio(struct mtk_pinctrl *hw, unsigned int gpio_n) > > > > desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio_n]; > > > > + /* if the GPIO is not supported for eint mode */ > > + if (desc->eint.eint_m == NO_EINT_SUPPORT) > > + return virt_gpio; > > + > > if (desc->funcs && !desc->funcs[desc->eint.eint_m].name) > > virt_gpio = true; > > >