From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43938334C04 for ; Thu, 19 Feb 2026 16:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771520070; cv=none; b=o5OeQi1kHJHRSVbRfPhDhvXpzVZms9UqcOtznLnqs56+aJBGULdIWmjVbh6koHD3eGAU1ITJaCc5QxNYdzp89m6lVGjSg85xQCSWKw+afrqSX7amvbEopOcfDEMLDhfkkyekGIMkEpjLhO2zClmMt9psF9f1BC4is4zMmExFzx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771520070; c=relaxed/simple; bh=2VBPj5WIpRN2SIBxTrDBDX/SrjuB1jiqkZTQeduSAwg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QB5zuA2yF6V+ZldqmnPaxJwEhPPReqPK+efXf4IGSIEAjYcvKRJ/CT7+Zqd+uxdrqHgDu/96DE3bjjURwxhlY5SR72AfWw8FEsezaaUXUIfH+hUfq3HCtzaiQi1BUdK1WL9XEdined3PvVoV8eAEk0oJSoPNCA08BofC4Iq4fK4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kXfyQQS3; arc=none smtp.client-ip=74.125.82.172 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.b="kXfyQQS3" Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-2b4520f6b32so1487670eec.0 for ; Thu, 19 Feb 2026 08:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771520068; x=1772124868; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=tNOMVKayZqs2xkHfdF/fmOBXKVqxQ8+G8UAd/SZpHC0=; b=kXfyQQS3o6VNxSvzuiB/J3W+JffRfXwFk/CZI13s+lNVBS696udcygIkV84G2bxsA9 RhcqlMn9LBHkJ8g+IL7tFU1811VcxemKIxQ6o8rmS/xM1+cWU6sqVt+AL3TzctFfgcWZ 9+Kb53Q+xsrcZZ+LQdAZIGwrxJphiY81XuXG00SM1sgh8S8bVfcD+izscRzE+DKAm4S+ 7SKF24fIwtZXKthwNni1LGG6u1tqBxBYpgP3TBJLIE+zBkywTHzH1uuj9v17PgZg6pPE Fwjp4QJb+2L55pr3QjaLR9lsKnj1Pk+uYz2HbCwA8SOqFI+t9ymuCAjhH2LGLEUaFvOZ j+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771520068; x=1772124868; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tNOMVKayZqs2xkHfdF/fmOBXKVqxQ8+G8UAd/SZpHC0=; b=dWlOBzbpMQSqO0AjnD++v7hec0eI9FHRA90Ph+aE+0NKTB2kPGZg2wsz47Gu9zF7to jsD3y+YhCdei7QWiARcrDLZbSnrO7W3/FQnZ4GgFrdlSPJaEwALO/RN4UpHYFQHybUEB tdazyX3LaY5JHV9F8c03XG+bxZnKd/sbs4e313USRvSAb5ZjfDcrNKBrzTnEXZM5KVrP brtlos/Nw6DFfC2Hu08A0C997CWZzjvqTCbktA9B3NZwn0WXtys4+Nt4/EVygzU1i/DW J+LYxddsIrOhikbrqizvQGldx+zgJw8GqzT3/7WJjOjZ9yuGu35yv61fwreBIrR0vR+V nmaw== X-Forwarded-Encrypted: i=1; AJvYcCVtKiD+HKXURlyB1QUnLjxJSNPkFLMODwqwKM8ZxaltbKX6FgMJU5eQv4F5/mG1lAfbSiROoHDZiL6vOYU=@vger.kernel.org X-Gm-Message-State: AOJu0YypkyXpY1pweK+gMV5vAKlNeFZhs/sLbMkPZjosW9R7fo49u1+6 /mypMREHlx7+G1mJNloox4GaM8NiTF6014DBuDtV6cO9JsMvFlpruR/y X-Gm-Gg: AZuq6aLx+Ow+i40WlFTH0pzOTAtP9I46nTvYFpqh+u2WxM7xXqJmT+upTzF2rUUmupg eBvtd9Xy5NQAkAOogHcqn9//BsEDctqr08auDKHOEVFPTC7NoJoyNMprHkLZ236iUs8oIvt6d9m wrKuS6YzjGwpbDJ4iNeLHLIIo47hdzV3pmCtw0kSOrRllwpxP0wDB7lLXn4NyuiZTg0Eq6Bg5uk ZY9tD4x8xyypQ2GZ4U4Z0etjVhcKXQR7uMdi5mpB5nDBWWb/lWinZeW6XSRQwHZdRQduuNrp7Ul +vfzCQHSavkUV2RGGol2bOj4QwT1UU8i85WNjLjKXf2qzZ4bAMyxrUL48YXudBSPyK+FLWyz6XT 0YoRknCJnwkiMv2lmXBMmdAjC5OqmkqnOlR8Cok/ZfAocmez0m9h6XLqrIyewV91ofoxI2EI66p UKaap3Fa1/0GWr9ihd14MRTgXdWPWwZY9JEvRPc+eN7fjdW372NbnXXejUHB0Wbs/v X-Received: by 2002:a05:7300:ed0e:b0:2ba:67ef:532 with SMTP id 5a478bee46e88-2bd502a01b3mr2635653eec.43.1771520068169; Thu, 19 Feb 2026 08:54:28 -0800 (PST) Received: from google.com ([2a00:79e0:2ebe:8:9c24:8181:603e:7ad7]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2bacb577bcasm21098242eec.12.2026.02.19.08.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 08:54:27 -0800 (PST) Date: Thu, 19 Feb 2026 08:54:24 -0800 From: Dmitry Torokhov To: Bartosz Golaszewski Cc: Greg Kroah-Hartman , Bartosz Golaszewski , "Rafael J. Wysocki" , Danilo Krummrich , Linus Walleij , Andy Shevchenko , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 1/2] driver core: provide device_match_fwnode_ext() Message-ID: References: <20260219-device-match-secondary-fwnode-v1-0-a64e8d4754bc@oss.qualcomm.com> <20260219-device-match-secondary-fwnode-v1-1-a64e8d4754bc@oss.qualcomm.com> <2026021900-trekker-twenty-9daa@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Bartosz, On Thu, Feb 19, 2026 at 05:39:47PM +0100, Bartosz Golaszewski wrote: > On Thu, Feb 19, 2026 at 5:36 PM Greg Kroah-Hartman > wrote: > > > > On Thu, Feb 19, 2026 at 05:31:22PM +0100, Bartosz Golaszewski wrote: > > > Provide an extended variant of device_match_fwnode() that also tries to > > > match the device's secondary fwnode. > > > > > > Signed-off-by: Bartosz Golaszewski > > > --- > > > drivers/base/core.c | 14 ++++++++++++++ > > > include/linux/device/bus.h | 1 + > > > 2 files changed, 15 insertions(+) > > > > > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > > index f599a1384eec90c104601422b04dc2b4c19d4382..bbf1337978fafc35eb94bda85e0bb7f6879879c0 100644 > > > --- a/drivers/base/core.c > > > +++ b/drivers/base/core.c > > > @@ -5326,6 +5326,20 @@ int device_match_fwnode(struct device *dev, const void *fwnode) > > > } > > > EXPORT_SYMBOL_GPL(device_match_fwnode); > > > > > > +int device_match_fwnode_ext(struct device *dev, const void *fwnode) > > > > No kernel doc to explain what this function does? > > > > :( > > > > It's not like any of the other variants from this file were documented > but ok, I can add it in v2. Still, I'd like to hear if this even makes > sense. I think it really needs a good explanation given how it goes through secondaries on one side but not on the other (but maybe it should? Why one would not want to match secondary?) I also not fond of the name and still not quite sure if we need a special variant or if the normal device_match_fwnode() should be adjusted and its callers (there are about 20) should be audited (and maybe if the actually rely on current behavior we can introduce device_match_primary_fwnode() instead). And it should be a 'bool' (and we should fix the rest of them as well). Thanks. -- Dmitry