diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-04 09:57:30 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-11-06 09:51:30 +0800 |
commit | be1cee11b26880c385d9ce1d84792403a59f8855 (patch) | |
tree | d9af39c218ae3da65f62eb108722780ffa81de2f | |
parent | dd30c5bb574aba55e99284dbdfe0d6033bf44d7f (diff) | |
download | u-boot-be1cee11b26880c385d9ce1d84792403a59f8855.zip u-boot-be1cee11b26880c385d9ce1d84792403a59f8855.tar.gz u-boot-be1cee11b26880c385d9ce1d84792403a59f8855.tar.bz2 |
acpi: Correct reset handling in acpi_device_add_power_res()
If there is no reset line, this still emits ACPI code for the reset GPIO.
Fix it by updating the check.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | lib/acpi/acpi_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index 95dfac5..c3439a5 100644 --- a/lib/acpi/acpi_device.c +++ b/lib/acpi/acpi_device.c @@ -422,7 +422,7 @@ int acpi_device_add_power_res(struct acpi_ctx *ctx, u32 tx_state_val, /* Method (_ON, 0, Serialized) */ acpigen_write_method_serialized(ctx, "_ON", 0); - if (reset_gpio) { + if (has_reset) { ret = acpigen_set_enable_tx_gpio(ctx, tx_state_val, dw0_read, dw0_write, &reset, true); if (ret) |