From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Christophe Ricard
<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: jean-luc.blanc-qxv4g6HH51o@public.gmane.org,
ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
christophe-h.ricard-qxv4g6HH51o@public.gmane.org,
benoit.houyere-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH 01/10] tpm_tis: Introduce intermediate layer for TPM access
Date: Sun, 10 Apr 2016 17:45:25 -0600 [thread overview]
Message-ID: <20160410234525.GC11226@obsidianresearch.com> (raw)
In-Reply-To: <1460323386-16892-2-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
On Sun, Apr 10, 2016 at 11:22:57PM +0200, Christophe Ricard wrote:
> This splits tpm_tis in a high-level protocol part and a low-level interface
> for the actual TPM communication. The low-level interface can then be
> implemented by additional drivers to provide access to TPMs using other
> mechanisms, for example native I2C or SPI transfers, while still reusing
> the same TIS protocol implementation.
>
> Signed-off-by: Alexander Steffen <Alexander.Steffen-d0qZbvYSIPpWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Christophe Ricard <christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
> drivers/char/tpm/tpm.h | 41 ++++++++++
> drivers/char/tpm/tpm_tis.c | 188 ++++++++++++++++++++++++++-------------------
> include/linux/tpm.h | 11 +++
> 3 files changed, 160 insertions(+), 80 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index 8bc6fb8..a8f48a2 100644
> +++ b/drivers/char/tpm/tpm.h
> @@ -149,6 +149,7 @@ struct tpm_chip {
> * when the driver is unregistered, see tpm_try_get_ops.
> */
> struct rw_semaphore ops_sem;
> + const struct tpm_class_lowlevel *lowlevel;
Why? Put that stuff in the tis phy ops you already created
> +static inline void tpm_read_bytes(struct tpm_chip *chip, u32 addr, u16 len,
> + u8 *result)
And these don't belong in a the common header either
Jason
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
next prev parent reply other threads:[~2016-04-10 23:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-10 21:22 [PATCH 00/10] Rework of tpm_tis to share common logic accross phy's (lpc/spi/-i2c-) Christophe Ricard
[not found] ` <1460323386-16892-1-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-10 21:22 ` [PATCH 01/10] tpm_tis: Introduce intermediate layer for TPM access Christophe Ricard
[not found] ` <1460323386-16892-2-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-10 23:45 ` Jason Gunthorpe [this message]
2016-04-11 16:12 ` Jarkko Sakkinen
2016-04-10 21:22 ` [PATCH 02/10] tpm_tis: Extend low-level interface to support proper return codes Christophe Ricard
2016-04-10 21:22 ` [PATCH 03/10] tpm: Use read/write_bytes for drivers without more specialized methods Christophe Ricard
2016-04-10 21:23 ` [PATCH 04/10] tpm: Manage itpm workaround with tis specific data_expect bit Christophe Ricard
[not found] ` <1460323386-16892-5-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-10 23:42 ` Jason Gunthorpe
2016-04-10 21:23 ` [PATCH 05/10] tpm: tpm_tis: Add post_probe phy handler Christophe Ricard
[not found] ` <1460323386-16892-6-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-10 23:43 ` Jason Gunthorpe
[not found] ` <20160410234333.GB11226-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-11 20:22 ` Jason Gunthorpe
2016-04-10 21:23 ` [PATCH 06/10] tpm: Add include guards in tpm.h Christophe Ricard
2016-04-10 21:23 ` [PATCH 07/10] devicetree: Add infineon to vendor-prefix.txt Christophe Ricard
[not found] ` <1460323386-16892-8-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-11 19:47 ` Rob Herring
2016-04-10 21:23 ` [PATCH 08/10] devicetree: Add Trusted Computing Group " Christophe Ricard
[not found] ` <1460323386-16892-9-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-11 20:06 ` Rob Herring
2016-04-11 20:21 ` Jason Gunthorpe
[not found] ` <20160411202119.GA3357-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-11 22:37 ` Rob Herring
2016-04-10 21:23 ` [PATCH 09/10] tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy Christophe Ricard
[not found] ` <1460323386-16892-10-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-10 23:54 ` Jason Gunthorpe
2016-04-10 21:23 ` [PATCH 10/10] tpm/tpm_tis_spi: Add support for spi phy Christophe Ricard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160410234525.GC11226@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org \
--cc=benoit.houyere-qxv4g6HH51o@public.gmane.org \
--cc=christophe-h.ricard-qxv4g6HH51o@public.gmane.org \
--cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jean-luc.blanc-qxv4g6HH51o@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).