diff options
author | Michal Simek <michal.simek@xilinx.com> | 2019-01-31 16:30:58 +0100 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2019-02-08 06:25:15 +0100 |
commit | 003c9dc89176cacc9996f737d08490805e29582e (patch) | |
tree | 2aad94199a819a45930c372e5fe1cd28e692be1e /include/fdtdec.h | |
parent | 5ebc7c7e27780ce9a16289eeb87290eebd248ea9 (diff) | |
download | u-boot-003c9dc89176cacc9996f737d08490805e29582e.tar.gz |
fdt: Introduce fdtdec_get_alias_highest_id()
Find out the highest alias ID used for certain subsystem.
This call will be used for alocating IDs for i2c buses which are not
described in DT.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r-- | include/fdtdec.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index f1bcbf837f..c2dd87ede2 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -626,6 +626,19 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int node, int *seqp); /** + * Get the highest alias number for susbystem. + * + * It parses all aliases and find out highest recorded alias for subsystem. + * Aliases are of the form <base><num> where <num> is the sequence number. + * + * @param blob Device tree blob (if NULL, then error is returned) + * @param base Base name for alias susbystem (before the number) + * + * @return 0 highest alias ID, -1 if not found + */ +int fdtdec_get_alias_highest_id(const void *blob, const char *base); + +/** * Get a property from the /chosen node * * @param blob Device tree blob (if NULL, then NULL is returned) |