From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796327893; b=sKXVUFU0wpU7Xy4oNSH6T6t2pfK3ebkm89KIogqdHOlbRIFJu8etN07KSqzcSOPjVB9g Uyr6OyYwItOjJBAswmF7DDnuSDHI/2Vf3awDyWKj+zEE1dk4JXqnV6HQLOY/L6cACbOPU OTzVtobMzU5m9VaUnXsle0pGiQ4aUVdEQo+pDe5OlKXhQGnkLpbbCQH8GlXwUG7CSdWbr 0NRcE1jgeuW0EkFBW+FOZ5CF+Ht/PUVXtUEk/vQpOur4OF2CZJ9U+wG83OKw2ApWcyeA1 Cvy6LUCepO+F0ecKGlspDm6UszBi+oJMkInYw2mjGqoigcfyCgbI58ShUiT9Em0HyNg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796327893; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding: Content-Disposition; bh=p9du6KR5daeAtThXw0CDQqC0+nBJxRkpU+70Kp1KSPU=; b=TWyqAwghE4FrCN5ugttzTX7VYVdr1CQYT+8Fiu6w5ZI4ch+g/DMDYIvF9XvSzK9fuP4w ap1f4kifHWazCx1MHF0DmN0JW4LdPUsstTzq+2EqnBWU08iB5n5XbFqFJQIA14TUGuhhv jyDyMCT78WMbWwEIOb2UCFTGerzDF2ULItQeY1doOYOvLIeGL+uEaaNajb8JBUQmVHdsc QDRl3zEIq7rEcqn5ky83U6OpH+Stn0UloaL0fuPhrh7wKC4W5qgahIg6+oI9YV0zQCx4/ 7du1evPGTNgqEOkcCu/02OqDoqgmoORTjxD+kfcEAsXo7gGs8qxTjiNj/g7MjqZOvuQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xLQm7oS+; arc=none smtp.remote-ip=74.125.82.53 Received: from mail-dl1-f53.google.com (mail-dl1-f53.google.com [74.125.82.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 039E7606A322 for ; Thu, 3 Dec 2026 19:58:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 039E7606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xLQm7oS+ Received: by mail-dl1-f53.google.com with SMTP id a92af1059eb24-1b5d5fdefe2so168435c88.1 for ; Thu, 03 Dec 2026 11:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796327892; x=1796932692; darn=vger.kernel.org; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=p9du6KR5daeAtThXw0CDQqC0+nBJxRkpU+70Kp1KSPU=; b=xLQm7oS+6CfWpGhUB1fEDFwhpuZe/x8JzA313IxuzW+rrkEbV4synAmW7zaeAoNXVg x3s/nayzlMRyYpLrpDuRKJMFbJ2mfKzT2Snya21KgwqagMWlEwqU4Pjqnsm7pkV5U44I 6H7RGoJuOXmF0lgElyB9c/JimZowHidvkCng3XEofNrfRDVwJLQ31Q2op6fveHOMdCbU O7TI2079w1T2EkfKsty5m0jucV9bRPiG/jL9faWPbL68dtoQfGw635Evdar3Y/CVCmbu NKrozW0vNQiGX8ztKFGqHQK6e3COgiDG/wHca+yY1Ia5/WP2XWNWfIbd29x9bLS5davy Gdjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796327892; x=1796932692; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=p9du6KR5daeAtThXw0CDQqC0+nBJxRkpU+70Kp1KSPU=; b=aYbQIwRvmiTH9GOsqHheeKl1VDfGgEsMngp7SBroyKnIAzHZmD+wp7zklnsucrANco k0KRTZhuHww5YrBd1meWL4R5/bFBSWCVxmwG6FPTnp2FcxwwBbP9/jVx+xb6TBuwIbAi dUEkD3tn00c+ho8js/BgZi+ORnAvEs592br+eT9WPiZzUSJhvqxP3F6zpw+C5yywGx08 7HD6aMvMyjejN/iVlCg/5H2wGk2mI3xMlhdwLvCE95y2YNtd1C+igJhKGr0bjlAGZbZG joD9HWIm/OBkyy+9MscryUKWTBbNeIPIlvRiXMZEAEi4h26VTAmO48L3WpuyGPMh9cVx 1BWg== X-Forwarded-Encrypted: i=1; AL+hErHHMfn1n6zPjd/skLXJvWcQQpfAAAqz6yyzrpQnlaVPnPfWesTRNzFYAZW29iBB25Ngn6A2jz03qBm7@vger.kernel.org X-Gm-Message-State: APuU4Z8Plllt57wYp7nApa8EWxsvUp516E27hwXbEUayBgxegoQeP0C7 d5JnMhpNgNQwJk6BppNH4Zgp6mFlawuPhCmFIMu2R9lMJsNQ7mPdbr38 X-Gm-Gg: AZFdTZd2MDMBS15JlaDuiJ23UIfsc8mwgYLr2Vf1upoX2h/YzWzBwWevV5F55vY6Ycs L119V8gvieBXgN1YdHNZRKOiKyXTa4x+hVG3d9ZCWNlsyf1gWdW0BzzFMQMteKDnvSvQL2ar2eC 6/LlIZuM4OY6n4BzBbpGDwxUosJDvdUSV5sVClEsxOE95x/F0ofJSpi78hwiuSLQ+D/fNu05yhB 0CWk0nYoz2TDRmGrcEiiysGJu877HID1J9leNvFoEzfnEwlgyhpP/iX1E2EVAhlv0S0EM5Z4JT9 Dyy5/izjNTbxxFhPM6Dl1ecC1Pn7gLQ8taMW9hrw5lXUC/7gOA3zPqGO2ku/+PykRfKzIW5dMyl wqTUyCQRNEgNzLtJynE0/NJZo2Ad0+XGTDtQzhnGCLNj0PUVICGD01VDJbNWPo2094PfAd3UPzj gwNRJ19t0eVbXN+7BtE4WAYrFxRxigWKvemSDMXCRfewe2fBLftD2d4VJ8s1U3BbZDMcK+UMLZu wyqO+y47JellnsJC3lx+wnABNlUi4qzxBzHZCZ8rtixhRS9KMgfpKaEIolRQno8h5zJkS2xA0Z8 +SsPvAsRl4jU+0T45MkDm+SBmMVXc1f3JlUglik0h4h33Uxv/4dbuSOPJtuRQ4oo5xQ/NQ== X-Received: by 2002:a05:701b:4510:20b0:1b5:595f:4236 with SMTP id a92af1059eb24-1b5595f4800mr40263334c88.35.1796327891968; Thu, 03 Dec 2026 11:58:11 -0800 (PST) Received: from localhost ([2a00:79e0:2ebe:8:8d46:3395:fbc5:212f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5d642f101sm386079c88.5.2026.12.03.11.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 11:58:11 -0800 (PST) Date: Thu, 03 Dec 2026 11:58:10 -0800 Message-ID: <76b37401fb46d112333b5490740b6dd1@gmail.com> From: Dmitry Torokhov To: Andy Shevchenko Cc: Linus Walleij , Bartosz Golaszewski , Benson Leung , Guenter Roeck , Stephen Boyd , patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, chrome-platform@lists.linux.dev, stable@vger.kernel.org Subject: Re: [PATCH 0/6] gpio: fix firmware node reference count underflows In-Reply-To: References: <20261202-gpio-arizona-fwnode-fix-v1-0-3899179bf9d1@gmail.com> X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Andy, On Thu, Dec 03, 2026 at 02:09:43PM +0200, Andy Shevchenko wrote: > On Wed, Dec 02, 2026 at 10:45:45PM -0800, Dmitry Torokhov wrote: ... > > Commit 6dbe6c07f94f replaced gpio_chip.of_node one week before > > gpio_chip.fwnode was added in commit 990f6756bb64, making > > gpio_chip.fwnode the direct mechanism for passing a firmware node to > > gpiolib. Leaving the platform device's of_node unset also keeps its > > uevent MODALIAS as platform: and avoids pinctrl_bind_pins() > > conflicts on rebind. > > I'm not sure how it's possible. If you look at the Git history you can > see that 990f6756bb64 was the first one followed by 6dbe6c07f94f. I compared author dates instead of commit dates. When you wrote 6dbe6c07f94f on Dec 6, Bart had not written 990f6756bb64 yet (Dec 13), even though he applied his first on Dec 17, so the timeline still makes sense. > > Update arizona, tps6586x, tps65910, twl6040, and wm831x GPIO drivers to > > pass the firmware node directly via gpio_chip.fwnode while keeping the > > platform device as gpio_chip.parent, since MFD core already propagates > > any parent ACPI companion to those direct children. Because cros-ec > > sits behind an intermediate cros-ec-dev device that does not propagate > > an ACPI companion, set gpio_chip.fwnode explicitly in cros-ec and keep > > attaching the protocol device's firmware node with a devres-managed > > reference cleared on unbind to preserve acpi_gpiochip_add() behavior. > > As for the series, 5 out of 6 are the culprit of my single commit (sorry > for the troubles), would it make sense to combine? Otherwise it's easy > to have one in some (custom) kernel and not others. I'll leave the decision on combining them to Bart. > Nevertheless, I am okay with this approach for backporting, but I think > the problem should be solved in MFD core or platform driver core. > > Reviewed-by: Andy Shevchenko Thanks. -- Dmitry