Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp836402pxa; Wed, 19 Aug 2020 16:46:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvyAYGlgOpRcdLTTX1Q0T0Dhp3m3DShnNGr4elBXDvEtytzXGAheNYtLOI2oUI3g46cbvw X-Received: by 2002:a17:906:aed4:: with SMTP id me20mr731333ejb.141.1597880801425; Wed, 19 Aug 2020 16:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597880801; cv=none; d=google.com; s=arc-20160816; b=NAhb2JARywAyNC58QsYD93q5HOKy1I22Thk3yvh3j0B4SW8ftcLfYyp/EN0YA7Sb+c Jbnor49Ss2wnVhUACuA+vXa3kd/JxQ86Pn/HphzigJZ2FREFijNqGBLitSzg6MvTNfdS VqMe/hH76S01FAYNogeV+ChaacTluqHxXSGxZwe39wZi6cwX7EaTcGnffsj97Lyp2B8I 3lWTgOHiATzXYB+DbZqBWJRtzAdHsPhjsQ3E5ElURJ1PCU5nkfmmqYEGfzTOQ2Z7mQUi GI6aqBV6tmqx3tw5XoQbEiWfC1NvQZbJ2al8ROAHTRMtRMUAoogYrv0/y6av4YgLG4hE DtIg== 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=65uqJ400qnh1YolrNcuCdKwCBlsh0J6U+w9Te6ey+Gg=; b=nRWLIPsa6rbhok5YXXKEJNzgdrc3lmT6MFU6FTSm8W05REfI0SkI7ice1JwfdfCphk DbPhZiF6WhbDqFCK1vmBnLR0EsLKJxLNJCMmrEh+AGPdzsyRwJu7HxxgGUsenekgVPis uC8Hn+T3lIQxR9MIJRZMgHRBufzcN3kqT44BJQb/JGmT1iW02ds2Dh2yJLKwvuZzzwhu 4+SM30QYGYFchpSm+yKw0xz28XEjXPc5ICoNTW0KAn8mCta/T5ZfiKCq/7J5G6U2zqm/ WYm+zTro57RrS0N4scg8xPWy5PEWqoVvantb7aW0+L0KBqO1kJ9oURMShLAIe4fLKTHj x59w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lsGv7Ijx; 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 d2si302909edq.1.2020.08.19.16.46.16; Wed, 19 Aug 2020 16:46:41 -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=lsGv7Ijx; 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 S1726664AbgHSXnc (ORCPT + 99 others); Wed, 19 Aug 2020 19:43:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726209AbgHSXna (ORCPT ); Wed, 19 Aug 2020 19:43:30 -0400 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (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 CBB4920885; Wed, 19 Aug 2020 23:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597880609; bh=ElRgQNa+eCXKxKGiAwXCvT5SEdd/aIQYRPIeKR0A834=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lsGv7IjxoikfbbLi8veuPzeJZ4LzzUuP8aF0z+SUXXzi6hloYN69Oxkth75X7fuhx Pq3maN5J9QUHHgZNAc7O730nLvimgC0Ja4dzYQj3ncuK3mseUtibMYtnsOLeW8ZhvH SJUXUHgEK++U51u9gKAggXVtsIWRGANPt6nP1VBw= Received: by mail-io1-f47.google.com with SMTP id t15so542274iob.3; Wed, 19 Aug 2020 16:43:29 -0700 (PDT) X-Gm-Message-State: AOAM531iA1HECs8spdpL21INO6iEQEBvcBpSv7fAw/KVJTz+a5ccMpUT r+HcoXmG32TaTE6QOEtxY/8OMcFu/rYhybONuMo= X-Received: by 2002:a6b:c88f:: with SMTP id y137mr321019iof.55.1597880609305; Wed, 19 Aug 2020 16:43:29 -0700 (PDT) MIME-Version: 1.0 References: <1597317260-24348-1-git-send-email-hanks.chen@mediatek.com> In-Reply-To: <1597317260-24348-1-git-send-email-hanks.chen@mediatek.com> From: Sean Wang Date: Wed, 19 Aug 2020 16:43:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl: mediatek: check mtk_is_virt_gpio input parameter To: Hanks Chen Cc: Linus Walleij , Matthias Brugger , "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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hanks, On Thu, Aug 13, 2020 at 4:14 AM 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] it is better we post the complete call stack when the failure occurs > > Fixes: edd546465002 ("pinctrl: mediatek: avoid virtual gpio trying to set reg") > Singed-off-by: sin_jieyang signed-off-by with the full name > Signed-off-by: Hanks Chen > --- > 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..27ab9c512ae1 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 == EINT_NA) s/NO_EINT_SUPPORT/EINT_NA/ to align with pinctrl/mediatek/pinctrl-mtk-mt*.h uses > + return virt_gpio; > + > if (desc->funcs && !desc->funcs[desc->eint.eint_m].name) > virt_gpio = true; > > -- > 2.18.0