From 86660b06d12baf04588c79fe4fefde9ca554abdd Mon Sep 17 00:00:00 2001 From: "Mauro S. M. Rodrigues" Date: Mon, 1 Jun 2020 17:34:34 -0300 Subject: TPM/TSS: Register TPM chip for further use within TSS TSS will know which device and transmit handler to use through this registration, and the equivalent unregistering process. Signed-off-by: Mauro S. M. Rodrigues Signed-off-by: Oliver O'Halloran --- libstb/drivers/tpm_i2c_nuvoton.c | 1 + libstb/tpm_chip.c | 1 + 2 files changed, 2 insertions(+) (limited to 'libstb') diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c index 9a26fca..9d3ff82 100644 --- a/libstb/drivers/tpm_i2c_nuvoton.c +++ b/libstb/drivers/tpm_i2c_nuvoton.c @@ -608,6 +608,7 @@ void tpm_i2c_nuvoton_probe(void) free(tpm_device); continue; } + tss_tpm_register(tpm_device, &tpm_i2c_nuvoton_driver); bus = i2c_find_bus_by_id(tpm_device->bus_id); assert(bus->check_quirk == NULL); bus->check_quirk = nuvoton_tpm_quirk; diff --git a/libstb/tpm_chip.c b/libstb/tpm_chip.c index 004750f..f90282f 100644 --- a/libstb/tpm_chip.c +++ b/libstb/tpm_chip.c @@ -213,6 +213,7 @@ void tpm_cleanup(void) tpm = list_pop(&tpm_list, struct tpm_chip, link); } + tss_tpm_unregister(); list_head_init(&tpm_list); } -- cgit v1.1