]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: coral: Free the ACPI GPIOs after using them
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:00:01 +0000 (18:00 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 00:59:36 +0000 (13:59 +1300)
These GPIOs are needed later if Chromium OS verified boot is running,
so free them after use.

Signed-off-by: Simon Glass <sjg@chromium.org>
board/google/chromebook_coral/coral.c

index f9fb3f163f00c76b503b90fc45254a331b861abf..b255bf6187ec38cf4a2a030012b3d7e3240e2eaa 100644 (file)
@@ -63,6 +63,8 @@ int chromeos_get_gpio(const struct udevice *dev, const char *prop,
        }
        info->flags = desc.flags & GPIOD_ACTIVE_LOW ? CROS_GPIO_ACTIVE_LOW :
                CROS_GPIO_ACTIVE_HIGH;
+       if (!ret)
+               dm_gpio_free(desc.dev, &desc);
 
        return 0;
 }