]> git.baikalelectronics.ru Git - uboot.git/commit
dm: core: Add a function to look up a uclass by name
authorSimon Glass <sjg@chromium.org>
Thu, 28 Dec 2017 20:14:15 +0000 (13:14 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 3 Feb 2018 17:08:40 +0000 (10:08 -0700)
commit6fc60c3fb4e42c287d2cd6b5c9fc8f40fab145bf
treedeeea583f64dead224bba4cbad75da72efe4b5cf
parent8f45e3019c777fe0e3c2c6a7319bc72410f1f198
dm: core: Add a function to look up a uclass by name

Each uclass has a driver name which we can use to look up the uclass. This
is useful for logging, where the uclass ID is used as the category.

Add a function to handle this, as well as a test.

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