Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1083175rdb; Fri, 1 Dec 2023 06:43:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiVVqe91x9BrWCSGpDdr4tphwjzK4+31NJQ17jWIGyXc31Am3SFvq7liHi6r44Oq8jofLb X-Received: by 2002:a05:6a21:998e:b0:18c:a9d3:4f96 with SMTP id ve14-20020a056a21998e00b0018ca9d34f96mr19569296pzb.32.1701441798789; Fri, 01 Dec 2023 06:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701441798; cv=none; d=google.com; s=arc-20160816; b=b7ZxiACkFLNjWwZcESxNyG4gP89mJ4HSUv2zxGNaP9w6Uz4B2ArvvHpcMspon70SYU E7kd6V2fR1i3bxQB4v9luRK0icdFYQzH6+/bhS/a024Ms2gUA57uO4YmnzvGMo/nDUwL fCsBUBMIaMeAFkZSduEXOHrmjt6E5HbmT1ktcR1hnG0mgcYLY53X5ppT0G4XgWGBU7F/ 3g18sLgMCiLAT0Tv9P4LGi7zgbXFuCpVPx/u2t/sobcdPw07q6NHcWFqCDHncd7Iuu66 XFvcxXAQiCfpEQlPkOIeYRXsv7rpWfcteIoOPp6mGjekhzJWp5i5m52Sly3AZTzgwUqM jw7Q== 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=MeHPQXItxGwzbv6QpJekpb1ikFSiPcGnYtdVUGLJIS4=; fh=SY0oH+r8sruZ38dZ59JiQ6IkcdzgNrsZRY1S4fSgq8I=; b=g6V8wYKGUwpE/dQABYg9/zKvGVR2fe6u89zCG1v0NSp7uSnRCTGLEZ5LzISYOVRv1n TLBZ0zBmo7YE31tBZMlQ+eqMAKzVYMBVxtLPKUVhMz49k1jlKmkt73Awm2R6kEQzzxup GB4sfeuhLI05q91puP/tHpG+DPeehbJpUQWzOzIe4TbYh/zYd0KuEYO4uQFyJNxV3PtL DSAaGqJ+XvwhgHZTnVJUTg6GREsAdVrxStLuH3OPlNV6ekGdzYj9i3lN67lMkq8oCd3T X6A4c4uLw/NVL+50lSwVkMVDQ9924XyP8GNuYWR2PlQ/FSv03lO6+Vi2z4uK0MC2dFwA oeMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ix7sSaRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f12-20020a63f74c000000b005bdc49ba91bsi3591184pgk.151.2023.12.01.06.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:43:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ix7sSaRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 239B281C3D6D; Fri, 1 Dec 2023 06:43:16 -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 S1379214AbjLAOnC (ORCPT + 99 others); Fri, 1 Dec 2023 09:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379192AbjLAOnB (ORCPT ); Fri, 1 Dec 2023 09:43:01 -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 4B30610FA for ; Fri, 1 Dec 2023 06:43:07 -0800 (PST) Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (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 0717A40185 for ; Fri, 1 Dec 2023 14:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1701441786; bh=MeHPQXItxGwzbv6QpJekpb1ikFSiPcGnYtdVUGLJIS4=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=ix7sSaRT9L+/y6c+yakgKlxv/4xUpYPjYzUPiTEc7kQAh3h7I6lsjfF2e9DpV4mT1 sYjXZ1i50R9rwvPvj9xaLTRl1p2XsiABNy4o1Gx0xA5doP4uhVjez3+Jp+h2D8EB2y hJKrGs2NbECoJISynsqunJbScqz3RiWOmqTCXEaNXFSxufatYtUjAiV4RKSdA3fmZ2 1rqRd85SpYS6xp/dGjfVF+TR7Yz5CGzU8GfUss0HVwt6KLylUGwdkkWz+1HBZYfHWn R1G4z/F1p4JlJ+mLWsaIvAaOR64TWjfMZLUGF6/95aSnK4M5IgG0/D1xNcQc1Nv+Vj 4oiDiqOzkdLfA== Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-423a3c5e4a3so32191551cf.0 for ; Fri, 01 Dec 2023 06:43:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701441785; x=1702046585; 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=MeHPQXItxGwzbv6QpJekpb1ikFSiPcGnYtdVUGLJIS4=; b=EjEPmfHG3TxxjKADT9eEmG5ObH4Y7s0a0PIVEr11OzxFQnHn4Om0cglDIBKBg9qPIK Sjhyw6Ib0uyP8jFbSHcbrHTnqDuWceF+V7cD9CT2z8W6RVbeQli9uk9nP3EUu/qc5l6y cFK4qFZvbJ8LmHihSXhKpuLSgD783uGf6ltxT3iXLdD2jNGsN817d4U13HuGOOyJwpjb AOaHHd7dy6y96CcnC0mIGMNrToF2CyJzmH6NUB1w0VgKO0pk3FS0NLI30kCm2vDXVI3P vW+wKsNN08D6VVRLLO11E5DoulpUCW+REp/9+MELbDB6FMbY8ijA35yjaTJW4S822iHv AVpQ== X-Gm-Message-State: AOJu0YxHUViaBdBjNJgB00U8yBJSYI0cHySr8B2oa+PiAJb6FKbTmO1P DLNLKa/SPJlfkUv9d4n7R8MmE/vqZiiyFLvkssRwNyqkNgsLWWaVG+MIdag2bxtHl0V3Vd84Hrf wKG2FDLOptJqt7D4WT4E6EmQvt9VxKrMFOTssuyAhn49/TuTmRUXrVq+Cmw== X-Received: by 2002:a05:622a:4a0d:b0:423:9642:7824 with SMTP id fv13-20020a05622a4a0d00b0042396427824mr31391116qtb.49.1701441785054; Fri, 01 Dec 2023 06:43:05 -0800 (PST) X-Received: by 2002:a05:622a:4a0d:b0:423:9642:7824 with SMTP id fv13-20020a05622a4a0d00b0042396427824mr31391103qtb.49.1701441784835; Fri, 01 Dec 2023 06:43:04 -0800 (PST) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Fri, 1 Dec 2023 15:43:04 +0100 From: Emil Renner Berthing In-Reply-To: References: Mime-Version: 1.0 Date: Fri, 1 Dec 2023 15:43:04 +0100 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: starfive: jh7100: ignore disabled device tree nodes To: Emil Renner Berthing , 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 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 06:43:16 -0800 (PST) Emil Renner Berthing wrote: > 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? I just noticed the Allwinner D1 device trees use /omit-if-no-ref/ in front of the pin group nodes. I think all current pin group nodes (for the JH7100 at least) are used by some peripheral, so if you're removing peripherals from the device tree you should be removing the reference too and this scheme should work for you. /Emil