From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796327893; b=ZTvAAk93w9eSXoDSzykl+wZyi7WOQ9a4M8syxDqkTCqM4LSYlD7+slYQro6QmyewfLsv 9qN/3/tR4qGQZMjPlKypsu9YW3kfl9n9STP6CuJyW0y3F6P3L4nyDvFKDcKU4yHtWD5+n OUXgGTbQWSEt0c2Go9uu43gIImJ9qfHaRU6HABL9fybK675LNqGzYYBw1TLIfZpufiWCJ 2EnOwtBB6Y2xevNICw4FMkA6pN4ZhbVr08KWC/iiu2Lt3aGfSJUWMs+VvhmsXqoDY9oeO /GNDyq471BM6wDq5EDvuaNP6u2Cgkgdc3hwo7omXiNoL3r43sv0muGTtSG86nnnf/1w== 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=Dykc4S6WS9gL15frbAgaYzWD0gu3AOiELIc6TRxarCQeCckkWkl8j83K90k7zo0qRcZZ zQGbAMLK3ZunypY9Gzp4rSNKOBFa5MCYbITjBSD7lOJwof3XzMlOzPCCwSOhEr8CW9fqZ ohUYf3yOk3UrifRfj4cIhpoTSiYKzq2RvyIEuphCyFX+kBahP+t6jY8CQyy1QT0DB/3D3 dawpWsR6dqJOXBeFUlQNmmZg073noTnNKT1aCnNAZp9yPVcE/JAY6DT8fbo5Wj5BefmlP Rciw5tn5s8OiJyUPj8nsubQmvagggMQsIDSksq4dbyT5hdyZLruNHeqfROmCTxuXlMA== 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.52 Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52]) (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 0B6D6606A32C for ; Thu, 3 Dec 2026 19:58:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0B6D6606A32C 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-f52.google.com with SMTP id a92af1059eb24-1b5d5fdefe2so168434c88.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=On59rEoCWP46+24MKItg78WMtzmiLGOGThZpMCbl+9+SAf/xN4Nka+wSf9zaJJXIqm Vsa2bqzBkVQDbcaE51DmxuwPe68hO/GvJ6DWIcO5pGBe3K7ge521JEwD4o65vfbenhbg vYgQq6l/XA9QgRYcHXEB47UF+JEj49ovoKkL0BzFHxF2HTpoZsh8IyLPyW2ccKYX0Z6g WN+n/rhgSHI6LN22ghFUCVOkbHyMtI3UZCM95h05niGIYTb26fHYSIg6rTVKJKXA5GVU kLmtFxoWZAPQWfr+MQLS5X7ZPG4QkZHd7SMxBmG8a+tZPByDRJtfwVieLyCzsRXZcQnW Wmaw== X-Forwarded-Encrypted: i=1; AL+hErEbyebpoiS0YibmB3VORiejafa+/Aisdu6eSTvO4WA1NRGkbBWmZVDaH4FughqCAye5NApDwZI=@vger.kernel.org X-Gm-Message-State: APuU4Z+weE1DqQavfr6NOqf8u2UdsF6yrYcF5FUepZzdcGJM832XVipf jMX+tc+6NqWcyy3eeOG/wGCTGEUINiYrz0nJoT++znUiTf5ajBW7hpXgXOrMug== X-Gm-Gg: AZFdTZcCQ8cE8rEBusBuUG3dxWAsrCaxxDfM7dQ4UmHRZR4VIe4s01ibxoLcJgJ4aR3 KJt+KyA7yh3E+ii9bZiveOfKvUDD0Z8hIg9pr9VL2QoVHipM0fOLmFB7EOZZW6MxQAi2I7gwNep BIORMRdA2MQNbY8fhAZWEFAUVoGQMUeCJ3bvYYsvIHX3gjYx2zmy70A3ppaX1WPE74WBs+cmxL/ ms/AuBnS0ipZMk+kKwsm3joMPLu4D6vpULKrPemm93ZtB5QpYUlI+EvCkdmm+8+Y/PMUuKFmt4Z uR5ffAJ5wdjLlHbHEzzXk6kUsAPvWT2/zCscuReAy6z2AXdfKCP/k5kjtOm2oiTwrKOutxDZRNz pAi16JuZgWh/48gjwymVi485zbhIk4scC8ZBzIDDWrk43a2z96/7LKNGFk+Ef282N0oGhRrg2J/ 37k3cFLa5OK4k4IuvaD/7YQy0oCQVEO+arKRctfoVM5x1+bPTHhhLfl4vpja2dfhSVaT3G34+4z d7yaHC0Sj4Q1MwzBXafTk19eTj2aO4dEqhmAdm8FP/hHgJcCacCPj/H2J7PULJgV52erjjOenVI zQABCPVvJq/4Xl/Qvvru9iwkQgarSAS2B5prXyd6l6KXcOZgw+LSKTAdB3rVplCZlKeMAQ== 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: stable@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