Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-24 Thread Athira Rajeev
> On 18-Sep-2023, at 7:42 PM, Reza Arbab wrote: > > On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote: >> Add a function dt_find_by_name_before_addr() that returns the child node if >> it matches till first occurrence at "@" of a given name, otherwise NULL. >> This is helpful for

Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-18 Thread Reza Arbab
On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote: Add a function dt_find_by_name_before_addr() that returns the child node if it matches till first occurrence at "@" of a given name, otherwise NULL. This is helpful for cases with node name like: "name@addr". In scenarios where nodes

Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-15 Thread Athira Rajeev
> On 15-Sep-2023, at 8:00 PM, Reza Arbab wrote: > > Hi Athira, > > On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote: >> +struct dt_node *dt_find_by_name_before_addr(struct dt_node *root, const >> char *name) >> +{ >> + struct dt_node *child, *match; >> + char *child_node =

Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-15 Thread Reza Arbab
Hi Athira, On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote: +struct dt_node *dt_find_by_name_before_addr(struct dt_node *root, const char *name) +{ + struct dt_node *child, *match; + char *child_node = NULL; + + list_for_each(>children, child, list) { +

[PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-14 Thread Athira Rajeev
Add a function dt_find_by_name_before_addr() that returns the child node if it matches till first occurrence at "@" of a given name, otherwise NULL. This is helpful for cases with node name like: "name@addr". In scenarios where nodes are added with "name@addr" format and if the value of "addr" is