[PATCH v7 02/10] of: base: Add for_each_child_of_node_with_prefix()
Rob Herring (Arm)
robh at kernel.org
Thu Sep 12 13:31:32 PDT 2024
On Wed, 11 Sep 2024 15:27:40 +0800, Chen-Yu Tsai wrote:
> There are cases where drivers would go through child device nodes and
> operate on only the ones whose node name starts with a given prefix.
>
> Provide a helper for these users. This will mainly be used in a
> subsequent patch that implements a hardware component prober for I2C
> busses.
>
> Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
> ---
> Changes since v6:
> - Changed helper name to "for_each_child_of_node_with_prefix()"
> Changes since v5:
> - New patch
> ---
> drivers/of/base.c | 35 +++++++++++++++++++++++++++++++++++
> include/linux/of.h | 9 +++++++++
> 2 files changed, 44 insertions(+)
>
Reviewed-by: Rob Herring (Arm) <robh at kernel.org>
More information about the Linux-mediatek
mailing list