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

gpio: add support for node label based lookup in the shell



Use some new kernel features to make the experience of finding and
dealing with GPIO devices much more ergonomic by allowing the use of
devicetree node labels to identify GPIO devices by default.

Users who wish to avoid the associated footprint penalty can set
CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is
worth the price as a default. If we're running a shell, then we've
already paid a heavy footprint penalty.

Example output for qemu_cortex_m3:

    uart:~$ gpio devices
    Device           Other names
    gpio@40004000    gpio0
    gpio@40005000    gpio1
    gpio@40006000    gpio2
    gpio@40007000    gpio3
    gpio@40024000    gpio4
    gpio@40025000    gpio5
    gpio@40026000    gpio6

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