mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils/regmap: Use fdt_driver for initialization
The regmap driver subsystem does not need any extra data, so it can use `struct fdt_driver` directly. It always initializes the driver for a specific DT node. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
5fa510c5f6
commit
1f8db2f18f
@@ -10,17 +10,11 @@
|
||||
#ifndef __FDT_REGMAP_H__
|
||||
#define __FDT_REGMAP_H__
|
||||
|
||||
#include <sbi_utils/fdt/fdt_driver.h>
|
||||
#include <sbi_utils/regmap/regmap.h>
|
||||
|
||||
struct fdt_phandle_args;
|
||||
|
||||
/** FDT based regmap driver */
|
||||
struct fdt_regmap {
|
||||
const struct fdt_match *match_table;
|
||||
int (*init)(const void *fdt, int nodeoff,
|
||||
const struct fdt_match *match);
|
||||
};
|
||||
|
||||
/** Get regmap instance based on phandle */
|
||||
int fdt_regmap_get_by_phandle(const void *fdt, u32 phandle,
|
||||
struct regmap **out_rmap);
|
||||
|
Reference in New Issue
Block a user