Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1073354rdb; Fri, 1 Dec 2023 06:29:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqag8NU7kf/QRoxSQUfb/WyUJkxpqk59OKwNODK+c/QKHcP0xRnJPPzgxsmlzy6BboR2t6 X-Received: by 2002:a05:6a20:9c93:b0:18b:281e:51ba with SMTP id mj19-20020a056a209c9300b0018b281e51bamr28620741pzb.11.1701440942064; Fri, 01 Dec 2023 06:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701440942; cv=none; d=google.com; s=arc-20160816; b=wWd8IP6VOl9mtWj4zXj7MsHkBypr18+Q0dAs+CFqhCbi88w3hrHhw0NC+nZWRSqNGv H9Sk9KeUCvNrx+Fta5mN1eTypaxq74p9HS8SXli8FIOCjI6O8p2p+Lv6uXP3MubFi0AL 1oWh/Fjr9i8Autou9PVSaG5JvXAFHTkmzTslCI2w7ID4uIv+Iu09wv4/TJ82FSt1kq33 9+HHqIupJPONdE8mNqHR8rY9l88rQ9IyMxQG9YvKxoF/4GbRGgFZZPakJRRMrNZD+Ni2 wkChVtlPypA1y9vCowhO6eM20npIeCqeCnjA0xs4UoeKtRqClhOhOX282A0TjYoVVit5 33Sg== 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:mime-version :references:in-reply-to:from:dkim-signature; bh=J3tX3M2zYj5xzUQ87L+5qVD8j/S83Al/tHxvfxTDyUw=; fh=l+rEie4G5iF3VzyHhWG3HJIDr8OAM5pztcXHUCkP3Fw=; b=XC33WkSZWSmmv49pm1JeExANzSvxa+nZSNyyD6MLWltb7XZYVWAHQrmGYrJRMve1F1 FsRKh0azmj6qx7YeT31nJVYX2mL89n0+TLvdoaVp+PcK3lEWcWfGoYX8GWvnX+1MJVkC M8hJAIfiGVt/3WxxOdYVNOns0NuvCUkAbcuey3Jc00jtE83+kjeVNvJw/YEXAnNqS1cn z9xnFRN0CaOkAS2SB3XyUdByJZeVLAIZnQIhs/LN09XreQ1po1l8F1HSXDeFL6wFhBIK FO7LTDNBAx4hxj0Zf3VFDxdvxIfeUOJJicIfGh++E9vs3Q7PlNkaNlk3s8FYsuiCijEJ 067Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="AkkS/ol5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s8-20020a17090aad8800b0028573fb25c5si3452111pjq.132.2023.12.01.06.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:29:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="AkkS/ol5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A1CB784C29B3; Fri, 1 Dec 2023 06:28:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379161AbjLAO22 (ORCPT + 99 others); Fri, 1 Dec 2023 09:28:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379143AbjLAO21 (ORCPT ); Fri, 1 Dec 2023 09:28:27 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B546110FD for ; Fri, 1 Dec 2023 06:28:30 -0800 (PST) Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 790413F1D9 for ; Fri, 1 Dec 2023 14:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1701440909; bh=J3tX3M2zYj5xzUQ87L+5qVD8j/S83Al/tHxvfxTDyUw=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=AkkS/ol59EXGAb+QsIO/byDT45l8s7RHVDq5Qku8XiCzKUPH4+ZsfaE1m3h/Izi9g XFPzW74jIedKNmcw5nWkS0aejur4a3V59DqFIVaOhZ/qLjvTtkIDzbGxxPd1GLyOEh GSHX8obFb97QRLlrdaUyamDeLyievNzmu3v5VI1P49jpNeRX7gcYu9h+6fT7L3O1FB 32hzkslUhfC0DH6j+YsVXZnCuxpe9X/go57MOpztZD1eygWguSgfuxsf2yeN0yFFkt KXwC4iydgKmF5cLQQAxj79UkgSBtZOjvVALVYbVa+iB/AojdBg6HSkHZ0fJ6k1V0UB aWQ3DoenkOB9g== Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-423e22075f4so24776641cf.0 for ; Fri, 01 Dec 2023 06:28:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701440908; x=1702045708; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J3tX3M2zYj5xzUQ87L+5qVD8j/S83Al/tHxvfxTDyUw=; b=qZgAnZU7hVhgDCAqOA9e9k1FsFMRhTgOMl8//Osep7bykAfRbWPE/f2Zfps7JaHSWT c7qv37mih7yAecYonXcLyFjYgXtTNJTCQ7fgLXgrNAed2vU1VshojtHIg/X7ZnZKeRHY tK36MuSevnjFF0g/zdb0ARmwymkrWqLnUpkZP7ucmczJCcQ0xW0kFYk/3TMuMu8Kyyqx F7svxKIluH79cWUnYkZaAL0JgnnnEgk7ZGukRHTEDj/bjXpkksTlqBcyn0O8lPTluCAl QZywy6c8TMUoYJHhzFybRraOEaWM2zn+IywfA/btjg3HacMbTGSaHzC+5XO31ZCc/RdF lY7A== X-Gm-Message-State: AOJu0Ywf7OXAzqi1OhJTEnUNN80rxQBgZIHGKiYOgB1BaXUQVUkpCaQ1 QOv5Zbm0h4f25NkT0piphw6H8+mF9smJmWHRh9LHZFM6/awXzI+zHCWZRsQTvA5m5gwUFyZHij5 BMAtwV6X4mMyEJ2+zg5UTU/xwX9cUlbagYtcxGs99TKRm8rijNoagAyVHgg== X-Received: by 2002:ac8:5882:0:b0:423:74a5:2847 with SMTP id t2-20020ac85882000000b0042374a52847mr27370893qta.49.1701440908461; Fri, 01 Dec 2023 06:28:28 -0800 (PST) X-Received: by 2002:ac8:5882:0:b0:423:74a5:2847 with SMTP id t2-20020ac85882000000b0042374a52847mr27370879qta.49.1701440908234; Fri, 01 Dec 2023 06:28:28 -0800 (PST) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Fri, 1 Dec 2023 15:28:27 +0100 From: Emil Renner Berthing In-Reply-To: References: Mime-Version: 1.0 Date: Fri, 1 Dec 2023 15:28:27 +0100 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: starfive: jh7100: ignore disabled device tree nodes To: Nam Cao , 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: stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 06:28:44 -0800 (PST) Nam Cao wrote: > 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 SoCs") > 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/pinctrl/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, > > nmaps = 0; > ngroups = 0; > - for_each_child_of_node(np, child) { > + for_each_available_child_of_node(np, child) { Hi Nam, Is this safe to do? I mean will the children considered "available" not change as drivers are loaded during boot so this is racy? Also arguably this is not a bugfix, but a new feature. Same comments apply to the JH7110 patch. /Emil > int npinmux = of_property_count_u32_elems(child, "pinmux"); > int npins = of_property_count_u32_elems(child, "pins"); > > @@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev, > nmaps = 0; > ngroups = 0; > mutex_lock(&sfp->mutex); > - for_each_child_of_node(np, child) { > + for_each_available_child_of_node(np, child) { > int npins; > int i; > > -- > 2.39.2 >