mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils/gpio: Use FDT node offset as GPIO chip 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:

committed by
Anup Patel

parent
598cf961d8
commit
d71150ee70
@@ -20,7 +20,7 @@ struct fdt_gpio {
|
||||
int (*xlate)(struct gpio_chip *chip,
|
||||
const struct fdt_phandle_args *pargs,
|
||||
struct gpio_pin *out_pin);
|
||||
int (*init)(const void *fdt, int nodeoff, u32 phandle,
|
||||
int (*init)(const void *fdt, int nodeoff,
|
||||
const struct fdt_match *match);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user