lib: utils/regmap: Use FDT node offset as regmap ID

Since the FDT is not modified during driver initialization, node offsets
are just as suitable as phandles for use as identifiers: they are stable
and unique. With this change, it is no longer necessary to pass the
phandle to the driver init functions, so these init functions now use
the same prototype as other kinds of drivers.

This matches what is already done for I2C adapters.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland authored and Anup Patel committed 2024-11-05 17:54:41 +05:30
1 parent d71150ee70
commit 9782b8847d
3 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ struct fdt_phandle_args;
/** FDT based regmap driver */
struct fdt_regmap {
const struct fdt_match *match_table;
int (*init)(const void *fdt, int nodeoff, u32 phandle,
int (*init)(const void *fdt, int nodeoff,
const struct fdt_match *match);
};