Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp938207pxb; Wed, 6 Apr 2022 04:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU8UoX1PSU1PqfPdv8kpX5Y2XXMz7HKVvz0dN3PRmSw9R0f1a8K8yCarIUvwrs0WHR12CK X-Received: by 2002:a63:4945:0:b0:398:efe8:3b7a with SMTP id y5-20020a634945000000b00398efe83b7amr6837912pgk.106.1649245862167; Wed, 06 Apr 2022 04:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649245862; cv=none; d=google.com; s=arc-20160816; b=FboKUdbXJYn+v4829+nPVHg5WrvUcV3bNJwwWLsBumNTM94/frMKHSXyBkBrthJJWG Ut4Y3FpYVPb7hai+mWNJt2JS2+/32iMw+HFjYfokM2I06GHG+0VZf+nBRzuzhmHlKQXF ep9nQdK/79WnrOw5vzS4MFCZ4PmUhv97VTZ9H6/hYr+vpaIEXMLGkhlTRIxDhRk0ppnA 3kAnoip8s/MNapbucQQOQscmKNsVPFX0i+4cOLf0dF1VEUNmIkUYyGslGlv0hvB/X8Lj J3e6jKddMFE8UQNw6QIrWPQjxqZ1O+55M2WFfbv/2pBqvWFQP2CrCsAXRnNi2l4wxECm 8+mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PCoZcx7HcBoGAS2vt3DAnjpvkq3USqqXwhSPFUd4jgQ=; b=0US08X2ZMM/JIHgYfzTVZKMty8l2aYMh4f9iQEbHPnMPpztrbw8QvugXCw5YRzRyle ajWr3CAVHe1gP3YUCFsGNcFDyJvV4uMjFggLsVyj9HPEJFvqu0Ppj9DUTSi1R8vrIZ7c ncctdN2MEG07rreXuxMSF9HBesBAI4NG06BkkFQq3bfWQaDn83y0rkOyvgRj2dXMzpO3 xY0xQNPf2K7scoRPSMLfNn5NOxOQxQ7vavxA8zMNryTWQic4gn9zj+xn1ogMWKCyf8sD 5dhMHRcVI7VMHzpxmkIeU5h/W4NmIIJWvHQiVjuNt266x06iKozugL+3PVbarYwZFKG3 TNcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AmkKxCJx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z15-20020a056a001d8f00b004faa233cdf6si14778276pfw.148.2022.04.06.04.51.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:51:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AmkKxCJx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DB4C222FD9C; Wed, 6 Apr 2022 03:09:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1841649AbiDFBZG (ORCPT + 99 others); Tue, 5 Apr 2022 21:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349492AbiDEJt5 (ORCPT ); Tue, 5 Apr 2022 05:49:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B5D21AC; Tue, 5 Apr 2022 02:47:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DCD49B81B76; Tue, 5 Apr 2022 09:47:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38873C385A2; Tue, 5 Apr 2022 09:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152043; bh=letGfrqMJtS0jS6rXm/zbO8dXAw7rWWP4/AZLlOog+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AmkKxCJxsjqoanyv8ZHHP84dAik3mFEnxqvak9l3vPhi2+CJSxJgdsE0bzfd+Xpd6 TBJ5ix9Qs3m4CT1qXFtP4sPJqTEJFWFv+fO/dwgA0B2kdIJK4ywDXAziWJDYgt3A/7 43kJ7dyvOjXJK3uaSVmYlSv8xP2NkSxd9wxIWZDQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen-Yu Tsai , AngeloGioacchino Del Regno , Linus Walleij , Sasha Levin Subject: [PATCH 5.15 635/913] pinctrl: mediatek: paris: Skip custom extra pin config dump for virtual GPIOs Date: Tue, 5 Apr 2022 09:28:17 +0200 Message-Id: <20220405070358.873888158@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai [ Upstream commit 1763933d377ecb05454f8d20e3c8922480db2ac0 ] Virtual GPIOs do not have any hardware state associated with them. Any attempt to read back hardware state for these pins result in error codes. Skip dumping extra pin config information for these virtual GPIOs. Fixes: 184d8e13f9b1 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220308100956.2750295-7-wenst@chromium.org Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mediatek/pinctrl-paris.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index 2133964dfd59..02e2a259edd3 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -580,6 +580,9 @@ ssize_t mtk_pctrl_show_one_pin(struct mtk_pinctrl *hw, if (gpio >= hw->soc->npins) return -EINVAL; + if (mtk_is_virt_gpio(hw, gpio)) + return -EINVAL; + desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; pinmux = mtk_pctrl_get_pinmux(hw, gpio); if (pinmux >= hw->soc->nfuncs) -- 2.34.1