From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796327893; b=oedJlODRXhJWlkBS7yU+R/8wFBU1pDW53jSdTp99UOI7IYqqe7BLpIBk5LjQY5iYKzjk AtwQiAPSrpeWZAm3CJoXbidbWi71nT2HH8TnlwJdLcngwEmGK34z0gDKl+8iTDLKUXImO N2QGo7T4cJwkmMOZ7bOGT+CCxlFxwhiUocPdt6QlDOrJb/XUU6JYB/JAR7cEQTrhPxWvW Tsy7bIspfzBQ0D58qz4Nqx1M9Pf7LQZNcU+sqzZ6z6ZzHLXtWKKyKJopyW2YwNWIBLPhJ x99c8V9jxFBpV3OinckIJ+HjMpPY1rkV9Sczc4jaQfVyp+nEtAoG9+V2gf7X1iIdZzQ== 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=QEh7g/DghgQSUIKsOBhFtV1mOl8ApVb53RjUGPiScKB+3M43DGVrhFdqPqI5pM7NbmCJ E42CviShPIiptRm/OOEuXW0Jrih8+AR2MSAxlMziaM6YNL+9H/hJ311L7nDUgowvKC/Yd l4nIdcbTPP0I+pQIQOZhN3CQ25fO/BKhDDc6dxpHW7umS5caxd13mFqf+hina4oPxOaLC 35CVLm0u419AY63ZNsgirgwOO1RdANEnINcB9qGeBiiKx1LTiwy1h2UqU7tk+9zJlwnPS J5U9IYVPZWAgzUOLu+C7QA1TSxjznfVOc9B8opPMAtg6ctLH9epDDChFgQNfLn4NKww== 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=a6GswFOk; arc=none smtp.remote-ip=74.125.82.51 Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) (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 1549E606A32D for ; Thu, 3 Dec 2026 19:58:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1549E606A32D 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=a6GswFOk Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-1b5d5f0ba39so229306c88.0 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=lists.linux.dev; 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=a6GswFOknCE0qGZ+MjmhOCKZLbANYtO6Sd/TuZPyNHG7mDgglx4Ayn3VqWS2q7HI9O 2UuyF+dGPb1Wiv4XKeDPN7QaqqLUgZkX0edVSwNpUtX/DHB8BTqPWr4d2bPpeEvVkWJ/ IYYEW7zVBWDMrHFEmXqIWFbEh9rad++Y6OJfA+bVOG4+tdMUDTCM3Q3oTDzDxXDG5n1w Q7kmewQul0w4Ax4LB3LG82JJVosKfyBq/SDteG4jDEhioL8q7hN6OxYrlMNbv28WveBU WvG76DCnZfSz2lKEpMoVtB9wFV8du03ePXxoiQhjVuyLeWS+jUAA3bmo7sX6tkVYArlM nVcA== 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=p3drdr6OwkKFkmMHHBcLpXJtg11uOZxIT2lhNyn6i9EI3xJ26zXuWLXObVk+YZZHzY l13EJQBeDv2YUzahtt7CgjqlvaLb5xbKvcjVCHxGMpyOpdT2dDJTGK63PSdqiaWXy4l8 v+E9cRahCi0ltgVjA7z/jXZUpPfbsUQ9r0nBjka92JxstzYlvy9bh+mTJ9+grNf7IoKp aWj8Wwdc8KUwLxavv2GmH0/piY+wxkWdZtnpsbiuvQcRX/SbY511yvwp14rvYgtkDVUe zGSs2oYMdRazcMJ2uqrPaPRYD25RdpUziFaEH7yfSPHSKx03RPmQWTejd9f4mSCexVSA N/yg== X-Forwarded-Encrypted: i=1; AL+hErEf4FIcpOdepJY199y8rkdwwdhQ8wQQgRRxIKweJQqw2e6hrkGqzuFQuLzHSK2PCKK1Ac6unj/c3peF7xJJoU8=@lists.linux.dev X-Gm-Message-State: APuU4Z+fxAuGQLd1TzUD9vkYnkB3n/Eq5Sj0BTucQyRNu7T2ypEb2GGN IGfCr1ncIm7RFjyRRH/BK6edsOP2vs2rIzYOAMQusbIJWqqyU2/qmikL X-Gm-Gg: AZFdTZe9aNjgCITZEZBI+jWQ91a/XeAZz5dHXoN37I1LYT+eNAZm+PBcQIEIYGRTglb MMuwM6GmWVYaa+8fTbCnt30j7deGVJae/csWLLWk055VNqrR++EWAY/ayqYNdbhlw0pIZ2b4DTa /s4rygVB66Se1IA7NOSVyI7QjxY0JbQjX8WlfNa1ibA97KAuQBpdM9DrM3VjQ31feP7z07DuHV+ jOYYPcFdzWSJz8HWYC8DXsplK0Rx0FyQOWaJqnB/32Uglph+OiP5ygVmK4/K9BCIQfNXV2yCMlT 5DkLTJc4WJHgxrtU+yY3TLfYIyoA+L84jsJkTRsrfjMn+DQ7RG0+YEYnYapJuwKpNAjhCZGahCv K4au3hf7X3Cd4SmAowtDY/ljiroHuLf/RFiYnuMffu+3MteLQYYi3VioQeFrkQY8yAaG8j6J3Dr yaXnfLbkv+d4at1za4culJHa6ree2C3k/PnKPsia357316ihAZgL+QkO6hgk2a+j//Cikm1luLO ZMuGgcBWFvBXDJk88Yd1uYJi0buu2tKT27YqfQ2YyDIW2ygX/v+oRaeOpqhCBZxV9Ltxs+yCJjf RVasAQwm3y9zwsZX/U980YBpr4sbpRbjqjMB1AnPiHrdPUPDzNSdHp09rFK/cV9jdgHrXw== 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: chrome-platform@lists.linux.dev 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