[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/9VKV6ddpWlmU9f@orome>
Date: Wed, 1 Mar 2023 14:37:45 +0100
From: Thierry Reding <thierry.reding@...il.com>
To: Krishna Yarlagadda <kyarlagadda@...dia.com>
Cc: robh+dt@...nel.org, broonie@...nel.org, peterhuewe@....de,
jgg@...pe.ca, jarkko@...nel.org, krzysztof.kozlowski+dt@...aro.org,
linux-spi@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
jonathanh@...dia.com, skomatineni@...dia.com, ldewangan@...dia.com
Subject: Re: [Patch V6 2/3] tpm_tis-spi: Support hardware wait polling
On Mon, Feb 27, 2023 at 10:51:07PM +0530, Krishna Yarlagadda wrote:
[...]
> diff --git a/drivers/char/tpm/tpm_tis_spi_main.c b/drivers/char/tpm/tpm_tis_spi_main.c
[...]
> @@ -140,6 +206,28 @@ int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16 len,
> return ret;
> }
>
> +int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16 len,
> + u8 *in, const u8 *out)
> +{
> + struct tpm_tis_spi_phy *phy = to_tpm_tis_spi_phy(data);
> + struct spi_controller *ctlr = phy->spi_device->controller;
> +
> + /*
> + * TPM flow control over SPI requires full duplex support.
> + * Send entire message to a half duplex controller to handle
> + * wait polling in controller.
> + * Set TPM HW flow control flag..
> + */
> + if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX) {
> + phy->spi_device->mode |= SPI_TPM_HW_FLOW;
Can this be pushed up to tpm_tis_spi_probe()? The SPI controller flags
are fixed, so this isn't going to change at runtime, is it?
Thierry
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists