diff options
author | Philippe Reynes <philippe.reynes@softathome.com> | 2020-01-09 18:45:45 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:46 -0700 |
commit | bb3f47eb78ea50bad5f1848bdac84a05116c395d (patch) | |
tree | a1c4cf49fa903ccb2c3f42ff16587ed6cddba447 /include/tpm-common.h | |
parent | 28b417ce859490d6b06e71dbf4e842841e64d34d (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 <philippe.reynes@softathome.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/tpm-common.h')
-rw-r--r-- | include/tpm-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tpm-common.h b/include/tpm-common.h index f9c2ca2053..702cd6e93b 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 */ |