[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR12MB57699E524BF3CAF642AE3E56C3879@DM4PR12MB5769.namprd12.prod.outlook.com>
Date: Thu, 23 Mar 2023 11:59:01 +0000
From: Krishna Yarlagadda <kyarlagadda@...dia.com>
To: Jarkko Sakkinen <jarkko@...nel.org>
CC: "robh+dt@...nel.org" <robh+dt@...nel.org>,
"broonie@...nel.org" <broonie@...nel.org>,
"peterhuewe@....de" <peterhuewe@....de>,
"jgg@...pe.ca" <jgg@...pe.ca>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>
Subject: RE: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
> -----Original Message-----
> From: Jarkko Sakkinen <jarkko@...nel.org>
> Sent: 19 March 2023 19:13
> To: Krishna Yarlagadda <kyarlagadda@...dia.com>
> Cc: robh+dt@...nel.org; broonie@...nel.org; peterhuewe@....de;
> jgg@...pe.ca; 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; thierry.reding@...il.com; Jonathan Hunter
> <jonathanh@...dia.com>; Sowjanya Komatineni
> <skomatineni@...dia.com>; Laxman Dewangan <ldewangan@...dia.com>
> Subject: Re: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
>
> External email: Use caution opening links or attachments
>
>
> On Wed, Mar 15, 2023 at 03:47:33PM +0000, Krishna Yarlagadda wrote:
> >
> > > -----Original Message-----
> > > From: Jarkko Sakkinen <jarkko@...nel.org>
> > > Sent: 12 March 2023 03:19
> > > To: Krishna Yarlagadda <kyarlagadda@...dia.com>; robh+dt@...nel.org;
> > > broonie@...nel.org; peterhuewe@....de; jgg@...pe.ca;
> > > 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
> > > Cc: thierry.reding@...il.com; Jonathan Hunter
> <jonathanh@...dia.com>;
> > > Sowjanya Komatineni <skomatineni@...dia.com>; Laxman Dewangan
> > > <ldewangan@...dia.com>
> > > Subject: Re: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
> > >
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > On Thu, 2023-03-02 at 09:48 +0530, Krishna Yarlagadda wrote:
> > > > +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)
> > > > + return tpm_tis_spi_hw_flow_transfer(data, addr, len,
> > > > in,
> > > > + out);
> > > > + else
> > > > + return tpm_tis_spi_sw_flow_transfer(data, addr, len,
> > > > in,
> > > > + out);
> > > > +}
> > > > +
> > >
> > > Based on the condition, better names would be
> > Though condition is based on half duplex, functions are implementing
> > HW or SW flow of the transfer.
>
> Both are hardwaw flows in the sense that you are controlling a piece of
> hardware.
>
> BR, Jarkko
Yes. I will push new version with naming suggested.
KY
Powered by blists - more mailing lists