[09/15] TPM/TSS: Register TPM chip for further use within TSS
diff mbox series

Message ID 20200125001510.708149-10-maurosr@linux.vnet.ibm.com
State New
Headers show
Series
  • libstb: Advance TSS and mbedtls infrastructure.
Related show

Commit Message

Mauro Rodrigues Jan. 25, 2020, 12:15 a.m. UTC
TSS will know which device and transmit handler to use through this
registration.

Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
---
 libstb/drivers/tpm_i2c_nuvoton.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c
index 3679ddafc..44a61471f 100644
--- a/libstb/drivers/tpm_i2c_nuvoton.c
+++ b/libstb/drivers/tpm_i2c_nuvoton.c
@@ -10,6 +10,7 @@ 
 #include "tpm_i2c_interface.h"
 #include "tpm_i2c_nuvoton.h"
 #include <opal-api.h>
+#include <tpm2.h>
 
 //#define DBG(fmt, ...) prlog(PR_DEBUG, fmt, ##__VA_ARGS__)
 #define DBG(fmt, ...)
@@ -593,6 +594,7 @@  void tpm_i2c_nuvoton_probe(void)
 			free(tpm_device);
 			continue;
 		}
+		tpm2_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;