]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: move the PPI attributes to character device directory.
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 14 Apr 2015 14:56:48 +0000 (17:56 +0300)
committerPeter Huewe <peterhuewe@gmx.de>
Sun, 18 Oct 2015 23:01:20 +0000 (01:01 +0200)
commita7bbc9d1222cfe7fff299f3cbbeeaa98f8869f6a
treed1dc28f7780d6372238c907eedab83ac59f05eb3
parentbc39f78ea463b7692ea427874c5e777122c5502d
tpm: move the PPI attributes to character device directory.

Moved PPI attributes to the character device directory. This aligns with
the sysfs guidelines and makes them race free because they are created
atomically with the character device as part of device_register().The
character device and the sysfs attributes appear at the same time to the
user space.

As part of this change we enable PPI attributes also for TPM 2.0
devices. In order to retain backwards compatibility with TPM 1.x
devices, a symlink is created to the platform device directory.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jason.gunthorpe@obsidianresearch.com>
Tested-by: Mimi Zohar <zohar@linux.vnet.ibm.com> (on TPM 1.2)
Tested-by: Chris J Arges <chris.j.arges@canonical.com>
Tested-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm-chip.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_ppi.c