From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 B984478F54 for ; Thu, 20 Nov 2025 01:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763600503; cv=none; b=ltjsNvDIyXowIAjvQam7GhzeJYTwW4p8p6lP5OxfexYxQyRLjzjnaMUnbP3NrNhzbgLpAHaqNNUQRrWhCUve3+ApG+RC9ZboimGSSQHDArMBKCp2UeCx2ZiiQnyXdfLJlPF8nauLA0V6eA9J+em8zFQurSBeH7Cog45Reb+w2w8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763600503; c=relaxed/simple; bh=S1kXvrn93cUEzs6slAKgNy4bH/LtAkdBKIXZyolnmdQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tqAX3lduO5RGfiAZJUsyx5OaLeZVMdhvqAr0BdG42i1nDFbrXWE7BvlAweFH94l9Oa8ASgaxtF2RGBu60z3SUiAtRJyDTGFwv1n/p0yqHwnu2wbIqmsRktCmiYQ+N8Crq1Qv2M1BuCnZfUfIBpmaEhVUx1auoWs5n+hVG9qSy1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=lhzTm0Qc; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="lhzTm0Qc" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-297e264528aso3806325ad.2 for ; Wed, 19 Nov 2025 17:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1763600501; x=1764205301; darn=vger.kernel.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=eIEhL4VxM7ghK2mG+iC47nZUgip1BfB1tOdqThTNDgY=; b=lhzTm0QcxdqtPS1J4JbnNJt5ajkk/hdh8WuxmYfXVUw6pTKP4b7vU9lTFeGD+su3/z NRToEiG/D2qjElPhlJJfpMSPKwTHb9Rrn+At8Cpx/rb+8eVihs0OtC/Un+VRDfvWQHrS Hb7NxJq3md3oYXu3Ur6IcahIUxJy7ZYlVCOSPZ4p15/xsSQy9Q34fs4s6eY1DMsW1kQC H7k1++cuV+0ollpGjg9sABJNGiaPK8bM2G2x5dofh/X7G1sLslw5ObHR0FCfv4RAul0h T6dCEZEAsAvDz2i6ICXTCZVxZ9HPuebPbdIlQjpXN3lDeKTvjTJ70SQlPtx1ILYLOBd3 G7hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763600501; x=1764205301; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eIEhL4VxM7ghK2mG+iC47nZUgip1BfB1tOdqThTNDgY=; b=cR5zT0lXhybcz9eg7r+IqlXeIJY2Zx/EJ24KpQ+FImMzzeQOkHY1XCpFC4tnrUYsCJ 5W7QUL9pvISlXDOdtRjKEbiMo5RO1kSu/noVnum99dw3Nnguwv0EYxBSwPBJW1/M+PqI d9SPRrUFB6J4FN50gcH9g1v7mvdUphmGPltKQsDehgbQZ1XqJ+JBjOXaYNuxoIs++j/z g74/V9oUgPRN7acV0O2zjNIYPdACK83FsA9t0IQKl7YPSsT2nekP9SkWp9e3DwVYMJpB WDvb/x5/0Qr048zu+er0iRj/ykbbz7Y6QiXKP7WsFcSVk6jicxO7zcG73LAOawSSpIKT Hrqw== X-Forwarded-Encrypted: i=1; AJvYcCWMa/M0Ra5fqV1vmwZ8/zdVAKThd5wJCkaidpZcKRlLOyN/D5DFTZzlNIHxx7ehVH3d3QXCdJ5EvAmyoF8=@vger.kernel.org X-Gm-Message-State: AOJu0YxWDZGPT7nxHKDU3JGnbKBbJ7ZtLpJk1d6RGre279CuEmL9EAZh UQACwmpY8csIowZA8vr9Nk0RKzIYT2DrFow6W8L7GF/BQ8M7uRXvPf/FwMPX/3LcTko= X-Gm-Gg: ASbGncu++wicKsS7UoVqCFY/onYo6fzkveK/pamCCM+IStSWSP1ctuFpaIGLEh+ULzB 3VIDDBU6oVugN7Cokfb7ZXGKpStQDTbOO6I/n2cXElYycZFqQ+RiOnKcDJwvr/ImmuTNy6qT2ix NMy4gorRzJ8UE9V/lwoI2vu8zfIk/4qlbT8DsViwbSWqS/XvTPEgMvTZpfNOAN8dADVeoGu2JWa /D8RdPzleegbqxlpTkTug/gh2pxmy9b3Gd8rRclvoyUVdJiVogmRiTbdiO6ZerLTd8+3zFYWNYA vwppnpL46hP3CUb1DRmapy/K3M8LLxF3MNV6J8G+nU1WGAcw7zj3vRZLa0bAj8AYbvC+hNM2n37 NG3x5vd0NJJg7ihFfpLJQyK4F6izaHVcBIhOeK0MAaBO7UgMkpuuD3vq3HedakDuyh5wMLSdj+7 wIEDizRnRxKvCE/EiZGQM= X-Google-Smtp-Source: AGHT+IEqw78cftsDU7YZyIRB0CXtzePRU0iLnoit3ob3znYZ+DZXTr4p0cuA9rJuU7Vz7Z+gxqqtDg== X-Received: by 2002:a17:903:1a43:b0:296:2aed:4fab with SMTP id d9443c01a7336-29b5b05b6damr14930755ad.23.1763600500485; Wed, 19 Nov 2025 17:01:40 -0800 (PST) Received: from localhost ([71.212.208.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29b5b2ac81bsm6687805ad.93.2025.11.19.17.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 17:01:39 -0800 (PST) From: Kevin Hilman To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, arm-scmi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] of: Add of_parse_map_iter() helper for nexus node map iteration In-Reply-To: <20251119-topic-lpm-of-map-iterator-v6-18-v1-1-1f0075d771a3@baylibre.com> References: <20251119-topic-lpm-of-map-iterator-v6-18-v1-1-1f0075d771a3@baylibre.com> Date: Wed, 19 Nov 2025 17:01:39 -0800 Message-ID: <7h8qg1frf0.fsf@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Kevin Hilman (TI.com)" writes: > Add a new helper function of_parse_map_iter() to iterate over nexus > node maps (c.f. DT spec, section 2.5.1.) > > This function provides an iterator interface for traversing map > entries, handling the complexity of variable-sized entries based on > -cells properties, as well as handling the -skip and > -pass-thru properties. > > RFC: There's a lot of overlap between this function and > of_parse_phandle_with_args_map(). However the key differences are: > > - of_parse_phandle_with_args_map() does matching > it searches for an entry that matches specific child args > - of_parse_map_iter() does iteration > it simply walks through all entries sequentially > > There are likely ways to extract some shared code between these two > functions into some shared helpers, but I'm hoping someone more > familiar with this OF code can help here. > > However, before refactoring the shared code, it would be good to have > some feedback on this approach. For a bit more context, the need for this comes from the work in drivers/pmdomain to be able to create pmdomain hierarchies using a power-domain-map property. I just posted an example user of this functionality here: https://lore.kernel.org/r/20251119-pmdomain-hierarchy-onecell-v4-0-f25a1d5022f8@baylibre.com Kevin