Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp902645rdb; Fri, 1 Dec 2023 01:23:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPqhK2Q2krnEG1lqhPOBqMpAo9+MVCuMPp92R/luuGLejjD3L7tSxhM6iTROrQXRnLO9jE X-Received: by 2002:a05:6830:3486:b0:6bd:836:4fc2 with SMTP id c6-20020a056830348600b006bd08364fc2mr2682015otu.17.1701422628968; Fri, 01 Dec 2023 01:23:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701422628; cv=none; d=google.com; s=arc-20160816; b=MozALCTbOnbcdqXJECPwD0tArKTfi8lYs52k+Y+K83kE9k03pJ1G/swA4nXIlfzkus CYj6+kWdHUL0hg032SHLkUGDXaRZqF9YBGnxycN1WvDZ/iZKxfSGsBgplHWiV9L/ox2u zTa8mIzV61/c0/jtSWjTuewjsMy3lFoXq1GQ57AxEAsQfPMAHcO/maFXQEcGv3LKS0S+ 1vsWosOyTLJBVvKvZuyn4QxKREynROKTaFyCFL4NWJOCBgp7mm1+SsWDIbVewJfBh+IT 49h2GZbYta/uU2CdvqldYEH1OqsfdYNOiIf92Zwmr52IV9NrrhyV+ZkdossyNz5WZWRU 5BnA== 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 :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=+Dlkt5iITjDmgd8mHReFB0fl1WIjH8XvmMOEkx0Dpeg=; fh=IKK/SIZntHUrBqr6dWt/U2zb+FK4JqPWDhPbeJaAFoI=; b=O6mHISy+Gdqf6HjFBorFbLNq8l9M1nqcat+ckMNZjtr4VaPC+osF1/2zJIBZk81JFP xSFjvM/dbW5ipZMFQDtU1PpirXMVmeF42GyTXaA3HEQyEX0vHvjudUXeemq8DE2Pj6yT XwmjUL5Zzm8UGzH9zfM4oV337b5O3RloabyULfx+p8d5++aMlSGZHVPFdkSnuZiKgfY0 UwZP7ZpXFIBjBSoJ6ohr96au52vJxz0JDaFe5VBB6NhLbEiREAfkYO/TWjjZnhu/u9d1 9RZgHHGSbOLLq02ag2LtM9A+RSWJh9N6jspewayecrQwIchHmPD02VWtft1Mfx32TE9r gLVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ei2Izo4C; 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 k24-20020a63ba18000000b005bdbf2ac2d2si3081767pgf.85.2023.12.01.01.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 01:23:48 -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=Ei2Izo4C; 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 E8EEE8108378; Fri, 1 Dec 2023 01:23:45 -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 S1378004AbjLAJXb (ORCPT + 99 others); Fri, 1 Dec 2023 04:23:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377899AbjLAJX3 (ORCPT ); Fri, 1 Dec 2023 04:23:29 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 580CBA0; 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=1701422614; 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; bh=+Dlkt5iITjDmgd8mHReFB0fl1WIjH8XvmMOEkx0Dpeg=; b=Ei2Izo4CxRMXUkn6Bg+EApq+n5Bd54LwB0n1mGq3okEyD5fu1tOvFOlmUrKr+/p95Bg6cx LYM3Bm4Qj4x6xqJEPAkpYoU59L3Iq6PuUiWN+pjn6lcJ9AHGqUOTKcccBqK6ncEr2LFry5 Qc39YyXwjWOmsoonQ0h+vWK1zzrR2g/TqNkvV4GqNbBF2tBTAcLLVPQrLyKPPa+JP4GgoP Ha9CBX8+UHXW0ucKlZ4tVLEkFSK9msjIg5AythWrm4FbdPmVHOxYmmSZ+cXEo2yX5LI2ra 284MbaEt6egwYJ9Vi7XGQ37wOdhlrcGidqhi/7GQHm6H9Dg7lykJO/kBkEvsWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701422614; 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; bh=+Dlkt5iITjDmgd8mHReFB0fl1WIjH8XvmMOEkx0Dpeg=; b=p9a48Wwr2TRwuyNV19VS83ZkMfBM9TMBto2vTw8UP0cNLj6chlyNlbvhIu0LTZGY3yHenr MOZorrCUVNfdsUAw== 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 1/2] pinctrl: starfive: jh7110: ignore disabled device tree nodes Date: Fri, 1 Dec 2023 10:23:28 +0100 Message-Id: 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:23:46 -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: 447976ab62c5 ("pinctrl: starfive: Add StarFive JH7110 sys controller= driver") Cc: stable@vger.kernel.org Signed-off-by: Nam Cao --- drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7110.c index 640f827a9b2c..b4f799572689 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -135,7 +135,7 @@ static int jh7110_dt_node_to_map(struct pinctrl_dev *pc= tldev, int ret; =20 ngroups =3D 0; - for_each_child_of_node(np, child) + for_each_available_child_of_node(np, child) ngroups +=3D 1; nmaps =3D 2 * ngroups; =20 @@ -150,7 +150,7 @@ static int jh7110_dt_node_to_map(struct pinctrl_dev *pc= tldev, 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 =3D of_property_count_u32_elems(child, "pinmux"); int *pins; u32 *pinmux; --=20 2.39.2