tpm: TPM 2.0 sysfs attributes

Implemented sysfs attributes for TPM2 devices.

Documentation/ABI/stable/sysfs-class/tpm2 contains descriptions
of these attributes.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
tpm: TPM 2.0 CRB Interface

tpm_crb is a driver for TPM 2.0 Command Response Buffer (CRB) Interface
as defined in PC Client Platform TPM Profile (PTP) Specification.

Only polling and single locality is supported as these are the limitations
of the available hardware, Platform Trust Techonlogy (PTT) in Haswell
CPUs.

The driver always applies CRB with ACPI start because PTT reports using
only ACPI start as start method but as a result of my testing it requires
also CRB start.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
tpm: TPM 2.0 FIFO Interface

Detect TPM 2.0 by using the extended STS (STS3) register. For TPM 2.0,
instead of calling tpm_get_timeouts(), assign duration and timeout
values defined in the TPM 2.0 PTP specification.

Signed-off-by: Will Arthur <will.c.arthur@intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
tpm: style and ordering fixes for v3 patch set

- Remove dev_err() messages after tpmm_chip_alloc() and tpm_chip_register().
- Use devm_request_irq() and devm_free_irq() in tpm_tis.c.
- Fix the order of tpm_chip_register() call in xen-tpmfront.c.
- Fix the order of tpm_chip_unregister() call in tpm_nsc.c.
- Add comment about possible issue when releasing a platform driver in
  tpm_tis.c.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>