diff options
author | Jorge Ramirez-Ortiz <jorge@foundries.io> | 2021-06-03 12:40:26 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-24 14:36:50 -0400 |
commit | cc5afabc9d32933578536401114f91bbecff158b (patch) | |
tree | decd8c20bc02d9039ce2ea6952e4642a71bc8190 /drivers/tpm | |
parent | 8a0f5f6e70b32f04bd0a3eb845df7c55a3690e3b (diff) | |
download | u-boot-cc5afabc9d32933578536401114f91bbecff158b.tar.gz u-boot-cc5afabc9d32933578536401114f91bbecff158b.tar.bz2 u-boot-cc5afabc9d32933578536401114f91bbecff158b.zip |
drivers: tpm2: update reset gpio semantics
Use the more generic reset-gpios property name.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'drivers/tpm')
-rw-r--r-- | drivers/tpm/tpm2_tis_spi.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c index 4b33ac8fd3..1d24d32d86 100644 --- a/drivers/tpm/tpm2_tis_spi.c +++ b/drivers/tpm/tpm2_tis_spi.c @@ -589,18 +589,25 @@ static int tpm_tis_spi_probe(struct udevice *dev) if (CONFIG_IS_ENABLED(DM_GPIO)) { struct gpio_desc reset_gpio; - ret = gpio_request_by_name(dev, "gpio-reset", 0, + ret = gpio_request_by_name(dev, "reset-gpios", 0, &reset_gpio, GPIOD_IS_OUT); if (ret) { - log(LOGC_NONE, LOGL_NOTICE, "%s: missing reset GPIO\n", - __func__); - } else { - dm_gpio_set_value(&reset_gpio, 1); - mdelay(1); - dm_gpio_set_value(&reset_gpio, 0); + /* legacy reset */ + ret = gpio_request_by_name(dev, "gpio-reset", 0, + &reset_gpio, GPIOD_IS_OUT); + if (ret) { + log(LOGC_NONE, LOGL_NOTICE, + "%s: missing reset GPIO\n", __func__); + goto init; + } + log(LOGC_NONE, LOGL_NOTICE, + "%s: gpio-reset is deprecated\n", __func__); } + dm_gpio_set_value(&reset_gpio, 1); + mdelay(1); + dm_gpio_set_value(&reset_gpio, 0); } - +init: /* Ensure a minimum amount of time elapsed since reset of the TPM */ mdelay(drv_data->time_before_first_cmd_ms); |