[PATCH 13/20] dm: Support parent devices with of-platdata

Simon Glass sjg at chromium.org
Fri Oct 30 04:34:34 CET 2020


At present of-platdata does not provide parent information. But this is
useful for I2C devices, for example, since it allows them to determine
which bus they are on.

Add support for setting the parent correctly, by storing the parent
driver_info index in dtoc and reading this in lists_bind_drivers(). This
needs multiple passes since we must process children after their parents
already have been bound.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/core/lists.c       | 54 ++++++++++++++++++++++++++++++++++++--
 dts/Kconfig                | 18 +++++++++++++
 include/dm/platdata.h      | 10 ++++++-
 tools/dtoc/dtb_platdata.py |  4 +++
 tools/dtoc/test_dtoc.py    | 33 +++++++++++++++++++++++
 5 files changed, 116 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list