From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C58C433F5 for ; Mon, 20 Sep 2021 16:51:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E26B61350 for ; Mon, 20 Sep 2021 16:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E26B61350 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BD6FE80C68; Mon, 20 Sep 2021 18:51:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KSzHuqJ9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3986E81468; Mon, 20 Sep 2021 18:51:08 +0200 (CEST) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F15D780735 for ; Mon, 20 Sep 2021 18:51:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x529.google.com with SMTP id dj4so8019585edb.5 for ; Mon, 20 Sep 2021 09:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4GNP33TAt9cRh5cXk14tzm9Ow5k5LfMCDTlD0/3juMY=; b=KSzHuqJ9o8+wm1DfhFV1QxA0r7ZNO3o1piZbz5ulKDhtfrVvPowi+CANRcLsHRpXWw oR4jT848DdcVVwDU/Gdr8UBztOvskf3lf7YYCWrmNI0Vsize+rAWjFZGujUYP10wk+rK naMKIKIug5JdR70BVRfm9cSZp5vElBb9yqDNpS+50r0KQWS92ywMD64dVidJ+lpFx1cG KNQZbk8qesS9x0Qri7SIkkSaxmXRABTRPhiXDRB7TYHQ0mbdZmdIlYYSawibgAfJpbAx +XYg/c9UuhGQ4sDhlYIFQKk7OHBBE49f2iyL/jTKclEqsx3jdi96kCCpPke1KFR8xF3b hWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4GNP33TAt9cRh5cXk14tzm9Ow5k5LfMCDTlD0/3juMY=; b=NVWrOCkjdBLkB+mzDTqHWRmXPFqTvPFOwzh53wFN9b0MrjlC7+UpLPrk5HsbYpcgtJ /BKYB1ZOLe86SOj0SZb2ZGmTs+CH/ClcPMLZcBrAcQslfsSwOwlRRnX6Qu5D8mvoBe10 1Wg9mzHEGrGXFlUuIViZux8GcuXYjeK7TFf2wfLir9PRa6+8mhr2iIvhtDsstHmQyNRS TAhw+tqd8jVyvhjxtum133ea0I/bmzGdbtrNIEedrPJHeajv0hZlBxCJ8pfNLisLnpOH 7v4JOVntc5RaCryyoi6Jz5rcbV2ccqvlL+PLBUTGtB11q3kb5J6WOkvCO805emFrJxQo ItTg== X-Gm-Message-State: AOAM531VwfWBWI+VH/2UMaQfj9tS+PQDIieg9/glX3O3tI2CtPc5n93I 28/x3tfyCObEUZnrBE++DetuIQ== X-Google-Smtp-Source: ABdhPJzQLwE0bxCji61rNrMeOt1T/JgAeCgvLJTb/cgRqFj8QuACT3R2iwFjrAHX4ZBrNd+Ts4fTMg== X-Received: by 2002:a05:6402:1508:: with SMTP id f8mr30084137edw.255.1632156664586; Mon, 20 Sep 2021 09:51:04 -0700 (PDT) Received: from apalos.home (ppp-94-66-220-137.home.otenet.gr. [94.66.220.137]) by smtp.gmail.com with ESMTPSA id 21sm3593741ejv.54.2021.09.20.09.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 09:51:04 -0700 (PDT) Date: Mon, 20 Sep 2021 19:51:01 +0300 From: Ilias Apalodimas To: Jorge Ramirez-Ortiz Cc: michal.simek@xilinx.com, sjg@chromium.org, u-boot@lists.denx.de Subject: Re: [PATCHv5] drivers: tpm2: update reset gpio semantics Message-ID: References: <20210603104026.24346-1-jorge@foundries.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210603104026.24346-1-jorge@foundries.io> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Thu, Jun 03, 2021 at 12:40:26PM +0200, Jorge Ramirez-Ortiz wrote: > Use the more generic reset-gpios property name. > > Signed-off-by: Jorge Ramirez-Ortiz > Acked-by: Michal Simek > --- > > v5: added Acked-by: Michal Simek > > .../tpm2/tis-tpm2-spi.txt | 3 ++- > drivers/tpm/tpm2_tis_spi.c | 23 ++++++++++++------- > 2 files changed, 17 insertions(+), 9 deletions(-) > > diff --git a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > index 3a2ee4bd17..16f870225f 100644 > --- a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > +++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > @@ -6,7 +6,8 @@ Required properties: > - reg : SPI Chip select > > Optional properties: > -- gpio-reset : Reset GPIO (if not connected to the SoC reset line) > +- reset-gpios : Reset GPIO (if not connected to the SoC reset line) > +- gpio-reset : Reset GPIO (deprecated, use reset-gpios instead) > - spi-max-frequency : See spi-bus.txt > > Example: > 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); > Acked-by: Ilias Apalodimas