From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C04B0C3601E for ; Thu, 10 Apr 2025 17:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ndabrpg/uS3Lnpl8Uw5uYxKcz35CM6hCckBuN6uznzA=; b=3eFFPrOfuYbqb1nxGFIcSSTpRY dsx5c+9XplsM/a0ctnLtgAW7ZQQcJ5JD4rNco6XtKapINYY+eorFBs3++ZMZgVrVOiNTgUJwsgbyQ 30RAaPqba0YBdjbEqlgeKSrmJz2wCJvr61lfwh5buvxsE9UtIRv0Ra4NkXqXNlA+HaIXRuK4WcV9J pQMMDu0K0KLTXrjk9hhloIFc4Mrctzw7X3udPoL2IWv8qVRcIk9WmZ/dtwmqvN4Nge+6mIx9bM2qk xyi79gt4zcxOMD+3R1XFELU9xPmVXkuFn6jCXTKZdTdr8w2AFDAQaeqM0nx24i8gLs9HCHzcHCPE4 TksPpRrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2vey-0000000BMrN-2hct; Thu, 10 Apr 2025 17:25:52 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2uR5-0000000B83x-1bAw for linux-arm-kernel@lists.infradead.org; Thu, 10 Apr 2025 16:07:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744301247; x=1775837247; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vKTeQFFCmt46JdP7DyCiIVywztk+IaK0aYIzzD8T+Jo=; b=CEeRep//SjH5f5e+KsMp8vFUy07roUp82Dv3reR6+ixF/qG733JFv0wb 9nD/OSNeXTjU8x9ixncVryqMhj97YDoa8pCjf3wx2ZCqzof+kFLFDCv2K igGl4IublyvEJG4zYUSj1u0p2Sf2NKmohog8ibHzLKAWkXn3X7F3E1++m wEvEUfB1z5JbdYSxAlehZThVUmxJrfCMGccAG7ppZMLMYx8OEgoSycGTr 7tCOzsQE9WofjjuaTEva4HEbKyhTeZ3pIfeJK0NjDM+3+Mk1GwOjZwQGL DQBH5aKUpqdzYqVSob+3Idgeq0OYj80iX+rJYA0MbKzUhgvXZGeLT3cYS w==; X-CSE-ConnectionGUID: bar5koQBTxu8NpXAp24JmQ== X-CSE-MsgGUID: Vgg8hzdaSWieLBHPCkj4xA== X-IronPort-AV: E=McAfee;i="6700,10204,11400"; a="68321262" X-IronPort-AV: E=Sophos;i="6.15,202,1739865600"; d="scan'208";a="68321262" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2025 09:07:22 -0700 X-CSE-ConnectionGUID: G2NMB3yxTr6Jlw4dDbGdvQ== X-CSE-MsgGUID: hjUqUviBT8C0/8Ovewh4ww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,202,1739865600"; d="scan'208";a="129286470" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2025 09:07:15 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 349EB11F74E; Thu, 10 Apr 2025 19:07:12 +0300 (EEST) Date: Thu, 10 Apr 2025 16:07:12 +0000 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Lad Prabhakar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Nuno Sa , David Lechner , Javier Carrasco , Guillaume Stols , Olivier Moysan , Dumitru Ceclan , Trevor Gamblin , Matteo Martelli , Alisa-Dariana Roman , AngeloGioacchino Del Regno , =?iso-8859-1?Q?Jo=E3o_Paulo_Gon=E7alves?= , Ramona Alexandra Nechita , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v10 2/8] property: Add functions to iterate named child Message-ID: References: <2767173b7b18e974c0bac244688214bd3863ff06.1742560649.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2767173b7b18e974c0bac244688214bd3863ff06.1742560649.git.mazziesaccount@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_090727_471538_40F0E2C7 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 24, 2025 at 09:12:50AM +0200, Matti Vaittinen wrote: > There are a few use-cases where child nodes with a specific name need to > be parsed. Code like: > > fwnode_for_each_child_node() > if (fwnode_name_eq()) > ... > > can be found from a various drivers/subsystems. Adding a macro for this > can simplify things a bit. > > In a few cases the data from the found nodes is later added to an array, > which is allocated based on the number of found nodes. One example of > such use is the IIO subsystem's ADC channel nodes, where the relevant > nodes are named as channel[@N]. > > Add helpers for iterating and counting device's sub-nodes with certain > name instead of open-coding this in every user. > > Suggested-by: Jonathan Cameron > Signed-off-by: Matti Vaittinen > Reviewed-by: Andy Shevchenko > Reviewed-by: Marcelo Schmitt Kiitos! Acked-by: Sakari Ailus -- Sakari Ailus