mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
drivers: tpm: atmel_twi: implement get_desc operation
Without get_desc, the tpm command will not provide a description of the device in 'tpm device' or 'tpm info'. Due to the characteristics of the Atmel TPM it isn't possible to determine certain attributes (e.g open/close status) without using the TPM stack (compare Infineon and ST TPM drivers), so just print out the chip model and udevice name as the identifier. Signed-off-by: Mathew McBride <matt@traverse.com.au> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
fdb4a5fcd7
commit
fb30d99df8
@ -52,7 +52,10 @@ static int tpm_atmel_twi_close(struct udevice *dev)
|
||||
*/
|
||||
static int tpm_atmel_twi_get_desc(struct udevice *dev, char *buf, int size)
|
||||
{
|
||||
return 0;
|
||||
if (size < 50)
|
||||
return -ENOSPC;
|
||||
|
||||
return snprintf(buf, size, "Atmel AT97SC3204T I2C 1.2 TPM (%s)", dev->name);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user