]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: core: Add a function to find any device from device tree
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:38:37 +0000 (15:38 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:36:29 +0000 (13:36 +0200)
commita3b800af12faa83455b368cd4d3049dc6e767753
tree3426fb07a33307c1240e48820b7b0d843c7a780b
parent9130d3f3e9323b7c23e0c66504813ce0eb4b9aef
dm: core: Add a function to find any device from device tree

In some rare cases it is useful to be able to locate a device given a device
tree node offset. An example is when you have an alias that points to a node
and you want to find the associated device. The device may be SPI, MMC or
something else, but you don't need to know the uclass to find it.

Add a function to do a global search for a device, given its device tree
offset.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
include/dm/device.h