summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2025-03-24 09:12:50 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-04-22 19:09:52 +0100
commitf24303631489d250f330373a59b3412103a93b67 (patch)
tree586bff268ac7aa65c4d6e87ec46c127042d39332 /tools/perf/scripts/python/bin
parent4a135e924fae08053917b1c0ba0b89bd66bf2be4 (diff)
downloadlinux-f24303631489d250f330373a59b3412103a93b67.tar.gz
linux-f24303631489d250f330373a59b3412103a93b67.zip
property: Add functions to iterate named child
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 <jic23@kernel.org> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Link: https://patch.msgid.link/2767173b7b18e974c0bac244688214bd3863ff06.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions