[U-Boot] [PATCH 3/6] libfdt: add fdtdec_lookup_phandle_index()
Simon Glass
sjg at chromium.org
Fri Jul 7 03:58:42 UTC 2017
Hi Andre,
On 2 July 2017 at 18:59, Andre Przywara <andre.przywara at arm.com> wrote:
> In some bindings a property points to multiple nodes, using a list of
> phandles. A prominent example are UART pinctrl nodes, which use one node
> to contain the RX/TX pins and another node to describe the lines used
> for the hardware handshake.
> The current fdtdec_lookup_phandle() helper function to chase a phandle
> is quite convienent, but can only lookup the first of those handles.
>
> Introduce an extra function fdtdec_lookup_phandle_index() to take an
> index parameter and implement fdtdec_lookup_phandle() as a special case
> of that.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
> include/fdtdec.h | 12 ++++++++++++
> lib/fdtdec.c | 16 ++++++++++++----
> 2 files changed, 24 insertions(+), 4 deletions(-)
Can you please:
- Add a dev_read... version of this API
- Also ofnode_...
so that we can support livetree.
Regards,
Simon
More information about the U-Boot
mailing list