Commit bb3f47eb78ea50bad5f1848bdac84a05116c395d

Authored by Philippe Reynes
Committed by Simon Glass
1 parent 28b417ce85

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>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

include/tpm-common.h
... ... @@ -293,5 +293,8 @@
293 293 */
294 294 enum tpm_version tpm_get_version(struct udevice *dev);
295 295  
  296 +/* Iterate on all TPM devices */
  297 +#define for_each_tpm_device(dev) uclass_foreach_dev_probe(UCLASS_TPM, (dev))
  298 +
296 299 #endif /* __TPM_COMMON_H */