From: Heiko Schocher Date: Mon, 11 Feb 2019 16:50:48 +0100 Subject: [U-Boot] [PATCH v2 1/7] dm: core: Add of_alias_get_highest_id() In-Reply-To: <17aae762d4e43774b24d7884ee56bf5ba417f274.1548948659.git.michal.simek@xilinx.com> References: <17aae762d4e43774b24d7884ee56bf5ba417f274.1548948659.git.michal.simek@xilinx.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Michal, Am 31.01.2019 um 16:30 schrieb Michal Simek: > 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 > Acked-by: Rob Herring > Signed-off-by: Wolfram Sang > " > > Add it also to U-Boot for DM I2C support. > > Signed-off-by: Michal Simek > --- > > Changes in v2: > - Update kernel-doc binding > - Return -1 in case of error. -1 means that the next free alias is 0. > > drivers/core/of_access.c | 18 ++++++++++++++++++ > include/dm/of_access.h | 10 ++++++++++ > 2 files changed, 28 insertions(+) Applied to u-boot-i2c.git master Thanks! bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de