]> git.ipfire.org Git - thirdparty/u-boot.git/commit
dm: core: Add of_alias_get_highest_id()
authorMichal Simek <michal.simek@xilinx.com>
Thu, 31 Jan 2019 15:30:57 +0000 (16:30 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 12 Feb 2019 08:42:58 +0000 (09:42 +0100)
commit7ed79685b3c838045bda975d85e0251b1aeca506
treeedb3b22c7b466ece30593fc5b35a7975be93cceb
parent08ffa62b050b933cbe26f8fb0d1b834f2d53e3ba
dm: core: Add of_alias_get_highest_id()

The same functionality was added to Linux for i2c bus registration with this
commit message:

"
of: base: add function to get highest id of an alias stem

I2C supports adding adapters using either a dynamic or fixed id. The
latter is provided by aliases in the DT case. To prevent id collisions
of those two types, install this function which gives us the highest
fixed id, so we can then let the dynamically created ones come after
this highest number.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
"

Add it also to U-Boot for DM I2C support.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/of_access.c
include/dm/of_access.h