From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20190628151327.206818-1-oshrialkoby85@gmail.com> <8e6ca8796f229c5dc94355437351d7af323f0c56.camel@linux.intel.com> <79e8bfd2-2ed1-cf48-499c-5122229beb2e@infineon.com> In-Reply-To: <79e8bfd2-2ed1-cf48-499c-5122229beb2e@infineon.com> From: Oshri Alkobi Date: Thu, 4 Jul 2019 12:48:20 -0500 Message-ID: Subject: Re: [PATCH v2 0/2] char: tpm: add new driver for tpm i2c ptp Content-Type: multipart/alternative; boundary="0000000000000848aa058cde96af" To: Alexander Steffen Cc: Jarkko Sakkinen , robh+dt@kernel.org, mark.rutland@arm.com, peterhuewe@gmx.de, jgg@ziepe.ca, arnd@arndb.de, gregkh@linuxfoundation.org, oshri.alkoby@nuvoton.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, gcwilson@us.ibm.com, kgoldman@us.ibm.com, nayna@linux.vnet.ibm.com, dan.morav@nuvoton.com, tomer.maimon@nuvoton.com List-ID: --0000000000000848aa058cde96af Content-Type: text/plain; charset="UTF-8" Alex, Jarkko, thank you very much for your feedbacks! > The long descriptions are still missing Will be expanded > I'd still prefer not to duplicate all the high-level logic from tpm_tis_core. But this will probably mean to introduce some new interfaces between tpm_tis_core and the physical layers. I totally agree, there are some duplications that can be common, indeed it will require some work in tpm_tis_core. Since I believe it is not going to happen soon, I would suggest to examine what duplications can currently be dropped from the new driver, so the kernel will support the PTP I2C interface in the meantime. I will appreciate getting ideas about any tpm_tis_core logic that currently can be used as is by the new drive. > Also, shouldn't the new driver be called tpm_tis_i2c, to group it with > all the other (TIS) drivers, that implement a vendor-independent > protocol? With tpm_i2c_ptp users might assume that ptp is just another > vendor Since the TIS is an old specification that mostly defines FIFO for TPM1.2 I would say the name tpm_tis_i2c does not completely reflect its goal. However we really don't have any problem with any name that the group will agree on. Does tpm_ptp_i2c sound better than the current name? Oshri On Thu, Jul 4, 2019 at 6:29 AM Alexander Steffen < Alexander.Steffen@infineon.com> wrote: > On 04.07.2019 10:43, Jarkko Sakkinen wrote: > > Check out tpm_tis_core.c and tpm_tis_spi.c. TPM TIS driver implements > > that spec so you should only implement a new physical layer. > > I had the same thought. Unfortunately, the I2C-TIS specification > introduces two relevant changes compared to tpm_tis/tpm_tis_spi: > > 1. Locality is not encoded into register addresses anymore, but stored > in a separate register. > 2. Several register addresses have changed (but still contain compatible > contents). > > I'd still prefer not to duplicate all the high-level logic from > tpm_tis_core. But this will probably mean to introduce some new > interfaces between tpm_tis_core and the physical layers. > > Also, shouldn't the new driver be called tpm_tis_i2c, to group it with > all the other (TIS) drivers, that implement a vendor-independent > protocol? With tpm_i2c_ptp users might assume that ptp is just another > vendor. > > Alexander > --0000000000000848aa058cde96af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Alex, Jarkko, thank y= ou very much for your feedbacks!

=C2=A0

> The long descriptions are still m= issing

=C2=A0

Will be expanded

=C2=A0

> I'd still prefer not to dupli= cate all the high-level logic from tpm_tis_core. But this will probably mean to introduce some new interfaces between tpm_tis_core and the physical layers.

=C2=A0

I totally agree, there are some duplic= ations that can be common, indeed it will require some work in=C2=A0tpm_tis_core.

Since I believe it is not going to hap= pen soon, I would suggest to examine what duplications can currently be dropped from the new driver, so the kernel will support the PTP I2C interface in the meantime.

I will appreciate getting ideas about = any tpm_tis_core logic that currently can be used as is by the new drive.

=C2=A0

> Also, shouldn't the new drive= r be called tpm_tis_i2c, to group it with

> all the other (TIS) drivers, that= implement a vendor-independent

> protocol? With tpm_i2c_ptp users = might assume that ptp is just another

> vendor

=C2=A0

Since the TIS is an old specification = that mostly defines FIFO for TPM1.2 I would say the name tpm_tis_i2c does not completely reflec= t its goal. However we really don't have any problem with any name that t= he group will agree on.

Does tpm_ptp_i2c sound better than the= current name?

=C2=A0

Oshri


On Thu, Jul 4, 2019 at 6:29 A= M Alexander Steffen <A= lexander.Steffen@infineon.com> wrote:
On 04.07.2019 10:43, Jarkko Sakkinen wrote: > Check out tpm_tis_core.c and tpm_tis_spi.c. TPM TIS driver implements<= br> > that spec so you should only implement a new physical layer.

I had the same thought. Unfortunately, the I2C-TIS specification
introduces two relevant changes compared to tpm_tis/tpm_tis_spi:

1. Locality is not encoded into register addresses anymore, but stored
in a separate register.
2. Several register addresses have changed (but still contain compatible contents).

I'd still prefer not to duplicate all the high-level logic from
tpm_tis_core. But this will probably mean to introduce some new
interfaces between tpm_tis_core and the physical layers.

Also, shouldn't the new driver be called tpm_tis_i2c, to group it with =
all the other (TIS) drivers, that implement a vendor-independent
protocol? With tpm_i2c_ptp users might assume that ptp is just another
vendor.

Alexander
--0000000000000848aa058cde96af--