summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Reynes <[email protected]>2020-01-09 18:45:45 +0100
committerSimon Glass <[email protected]>2020-02-05 19:33:46 -0700
commitbb3f47eb78ea50bad5f1848bdac84a05116c395d (patch)
treea1c4cf49fa903ccb2c3f42ff16587ed6cddba447 /include
parent28b417ce859490d6b06e71dbf4e842841e64d34d (diff)
tpm: add a helper to iterate on all tpm devices
This add a helper for_each_tpm_device that run through all the tpm (1.x and 2.0) devices. Signed-off-by: Philippe Reynes <[email protected]> Reviewed-by: Miquel Raynal <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/tpm-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tpm-common.h b/include/tpm-common.h
index f9c2ca20539..702cd6e93b8 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -293,4 +293,7 @@ static inline cmd_tbl_t *get_tpm2_commands(unsigned int *size)
*/
enum tpm_version tpm_get_version(struct udevice *dev);
+/* Iterate on all TPM devices */
+#define for_each_tpm_device(dev) uclass_foreach_dev_probe(UCLASS_TPM, (dev))
+
#endif /* __TPM_COMMON_H */