Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp902763rdb; Fri, 1 Dec 2023 01:24:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFuoLgcgISfKHtEjSipk9IRzcqts5z2zbhxOIvQgBTYG4VnovgJ37gn2xbGB2pYWoBhazP X-Received: by 2002:a05:6870:40c3:b0:1fa:2d82:b89a with SMTP id l3-20020a05687040c300b001fa2d82b89amr23595674oal.3.1701422644674; Fri, 01 Dec 2023 01:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701422644; cv=none; d=google.com; s=arc-20160816; b=W39JRqrT7utFEOARmM5VBbHtkBQR9Tb7ypZ7TpKK4LvlppT/qqJi3G8qlRuICSA+DU xZxaZFWEuGyWOqPIOpB1GVpinEcuIvkIMpYx4ylV0yhRqxC3KE3CAEZ+evew/yyqe936 K7UAHuLOlj6eF/CJUhehg/bNNZCKV7KYig6Ym4oO2UhX31sLgG4H7r1JpdUjlW4SHMtc TrXb8nVJkdqn1UzQPiru9VDE6qNZzRtqfbet0FuDJziOu4dvWNhXCzf4bVz9PZhPBh/g MTxopJfEU+HrAKTVzHg5OYexakQnOoSK+idrxSAbveE5M4WkghBzwvH1v3KWi81M53A4 LNMg== 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 :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=nAuB+NWb1+h9nrirqejk/RLzcirj6WRcoSRAbARMZUA=; fh=IKK/SIZntHUrBqr6dWt/U2zb+FK4JqPWDhPbeJaAFoI=; b=i8YIQdshNo90bMg93R6aeLnQhG0Nfv3GDYtfZ79xGHWA8f3LWte/UpKsyRev7QmtEN IraB7EBwPXaOPEPftba0ufiAyjPNbm3X/B1XyQll23de5tf4Ln3AkrJbKyXZ7BTOCfHs DOgzqgl4FyYKwn9JrNE5BF2LBxoMmQDSDg7v6IyHAm7VUhY7xxTHuRjfLm6FBYM6V6Z4 tSzh7AkiAxi2ru1nskwx2FVWTul8Sf2IwPZceIsEsE3Uee/0y/kT1Iwb1itYc7cXw9Aq J0sqEzYkOSFzbAYPq6x+6Qbbkzjg9WPLLrhj/XdJYfuP0ImELovhnm2erNneKatwj9f6 GpgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tGDR9eZq; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id cm15-20020a056a020a0f00b00578b37ad24bsi2906842pgb.619.2023.12.01.01.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 01:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tGDR9eZq; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 438A9810837A; Fri, 1 Dec 2023 01:24:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378009AbjLAJXc (ORCPT + 99 others); Fri, 1 Dec 2023 04:23:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377992AbjLAJXa (ORCPT ); Fri, 1 Dec 2023 04:23:30 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B37A2194; Fri, 1 Dec 2023 01:23:36 -0800 (PST) From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701422615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nAuB+NWb1+h9nrirqejk/RLzcirj6WRcoSRAbARMZUA=; b=tGDR9eZqdwVBv7/g90Ct9HkZutigEwF7ngGXBC+BJCXQQoFHN4SZeJEcPAk1kEfZK6uhUm jev2BdKZEWpF96N55lxD2jYDQO8NnCDrFcmrDHV9VSQg2CvYF1KJoXjQS3Ih7oTZTIgTQb p+1WMxrsmgMvM6U3hx8fQKu01nBI5+XqdYV1RBPRjOQ6OHIULZ9D9NIGTKEcGo4pidOeT6 Rcq7KgFbkeumyAQzK+S8hG2IvvAI3FV21O9L9iJSbHl1tyzcnjjYNy9qJF9yxC3sQzbjGP IoepgDGclqu+dwbYuaRJr0BcAsz35D9078zP+x+vnZeL/Nr4u710h/8ErzjxSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701422615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nAuB+NWb1+h9nrirqejk/RLzcirj6WRcoSRAbARMZUA=; b=A9ARbpvm7QOTKyyBB7JLD1eW7y/nyFyioCc01jf3h7pElP7NZmdrLwXNwXLV59pcm5uQGw X5zAVFsE//77j/Cw== To: Emil Renner Berthing , Jianlong Huang , Hal Feng , Linus Walleij , Huan Feng , Andy Shevchenko , Drew Fustini , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Nam Cao , stable@vger.kernel.org Subject: [PATCH 2/2] pinctrl: starfive: jh7100: ignore disabled device tree nodes Date: Fri, 1 Dec 2023 10:23:29 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 01 Dec 2023 01:24:01 -0800 (PST) The driver always registers pin configurations in device tree. This can cause some inconvenience to users, as pin configurations in the base device tree cannot be disabled in the device tree overlay, even when the relevant devices are not used. Ignore disabled pin configuration nodes in device tree. Fixes: ec648f6b7686 ("pinctrl: starfive: Add pinctrl driver for StarFive So= Cs") Cc: stable@vger.kernel.org Signed-off-by: Nam Cao --- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7100.c index 530fe340a9a1..561fd0c6b9b0 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -492,7 +492,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *= pctldev, =20 nmaps =3D 0; ngroups =3D 0; - for_each_child_of_node(np, child) { + for_each_available_child_of_node(np, child) { int npinmux =3D of_property_count_u32_elems(child, "pinmux"); int npins =3D of_property_count_u32_elems(child, "pins"); =20 @@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *= pctldev, nmaps =3D 0; ngroups =3D 0; mutex_lock(&sfp->mutex); - for_each_child_of_node(np, child) { + for_each_available_child_of_node(np, child) { int npins; int i; =20 --=20 2.39.2