public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH V3 1/2] tpm: add a helper to iterate on all tpm devices
@ 2020-01-09 17:45 Philippe Reynes
  2020-01-09 17:45 ` [PATCH V3 2/2] cmd: tpm: add a subcommand device Philippe Reynes
  2020-01-09 18:03 ` [PATCH V3 1/2] tpm: add a helper to iterate on all tpm devices Philippe REYNES
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Reynes @ 2020-01-09 17:45 UTC (permalink / raw)
  To: u-boot

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>
---
 include/tpm-common.h | 3 +++
 1 file changed, 3 insertions(+)

Changelog:
v3:
- use the helper uclass_foreach_dev_probe
v2:
- new patch, add an helper for tpm device (idea from Miquel)

diff --git a/include/tpm-common.h b/include/tpm-common.h
index f9c2ca2..702cd6e 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 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-05 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-09 17:45 [PATCH V3 1/2] tpm: add a helper to iterate on all tpm devices Philippe Reynes
2020-01-09 17:45 ` [PATCH V3 2/2] cmd: tpm: add a subcommand device Philippe Reynes
2020-01-09 18:02   ` Philippe REYNES
2020-02-05 17:57     ` sjg at google.com
2020-01-09 18:03 ` [PATCH V3 1/2] tpm: add a helper to iterate on all tpm devices Philippe REYNES
2020-02-05 17:57   ` sjg at google.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox