Skip to content
Commit 15c9d371 authored by Martí Bolívar's avatar Martí Bolívar Committed by Alberto Escolar
Browse files

kernel: add CONFIG_DEVICE_DT_METADATA and helpers



This option allows you to look up a struct device from any of the
node labels that were attached to the devicetree node used to create
the device, etc.

This is helpful because node labels are a much more human-friendly set
of unique identifiers than the node names we are currently relying on
for use with device_get_binding(). Adding this infrastructure in the
device core allows anyone to make use of it without having to
replicate node label storage and search functions in various places in
the tree. The main use case, however, is for looking up devices by
node label in the shell.

Since there is a footprint penalty associated with storing the node
label metadata, leave this option disabled by default.

Signed-off-by: default avatarMartí Bolívar <mbolivar@amperecomputing.com>
parent 74abb2bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment