lib: utils: support both of gpio-poweroff, gpio-reset

The generic GPIO reset driver has two entries in the match table:
"gpio-poweroff", "gpio-reset". Only the first entry is considered by
fdt_reset_init().

Define "gpio-poweroff" and "gpio-reset" as compatibility strings of two
separate reset drivers. They still can share code.

Fixes: e3d6919d10 ("lib: utils/reset: Add generic GPIO reset driver")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Heinrich Schuchardt
2021-07-22 12:53:59 +02:00
committed by Anup Patel
parent ce03c88ee1
commit e928472e67
2 changed files with 12 additions and 2 deletions

View File

@@ -129,8 +129,17 @@ static int gpio_reset_init(void *fdt, int nodeoff,
return 0;
}
static const struct fdt_match gpio_reset_match[] = {
static const struct fdt_match gpio_poweroff_match[] = {
{ .compatible = "gpio-poweroff", .data = (void *)FALSE },
{ },
};
struct fdt_reset fdt_poweroff_gpio = {
.match_table = gpio_poweroff_match,
.init = gpio_reset_init,
};
static const struct fdt_match gpio_reset_match[] = {
{ .compatible = "gpio-restart", .data = (void *)TRUE },
{ },
};