]> git.baikalelectronics.ru Git - uboot.git/commit
dm: core: add function uclass_probe_all() to probe all devices
authorVabhav Sharma <vabhav.sharma@nxp.com>
Wed, 9 Dec 2020 05:12:03 +0000 (10:42 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 16 Jan 2021 19:49:09 +0000 (14:49 -0500)
commit3a93786065d76bd9479482ad67713097900830eb
tree9f4334fb344de2b086001ecdbebdd054d4008a8d
parentbc0a00fc0a207528b924644900a0b0c62bfbfdf5
dm: core: add function uclass_probe_all() to probe all devices

Support a common method to probe all devices associated with uclass.

This includes data structures and code for finding the first device and
looping for remaining devices associated with uclasses (groups of devices
with the same purpose, e.g. all SERIAL ports will be in the same uclass).

An example is SBSA compliant PL011 UART IP, where firmware does the serial
port initialization and prepare uart device to let the kernel use it for
sending and reveiving the characters.SERIAL uclass will use this function
to initialize PL011 UART ports.

The feature is enabled with CONFIG_DM.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
drivers/core/uclass.c
include/dm/uclass.h