MIPS: convert CONFIG_SYS_MIPS_TIMER_FREQ to Kconfig
[platform/kernel/u-boot.git] / include / tpm-common.h
index 998b4fb..b2c5404 100644 (file)
@@ -120,6 +120,16 @@ struct tpm_ops {
        int (*get_desc)(struct udevice *dev, char *buf, int size);
 
        /**
+        * report_state() - Collect information about the current TPM state
+        *
+        * @dev:        Device to check
+        * @buf:        Buffer to put the string
+        * @size:       Maximum size of buffer
+        * Return: return code of the operation (0 = success)
+        */
+       int (*report_state)(struct udevice *dev, char *buf, int size);
+
+       /**
         * send() - send data to the TPM
         *
         * @dev:        Device to talk to
@@ -220,7 +230,7 @@ int tpm_close(struct udevice *dev);
  * tpm_clear_and_reenable() - Force clear the TPM and reenable it
  *
  * @dev: TPM device
- * @return 0 on success, -ve on failure
+ * Return: 0 on success, -ve on failure
  */
 u32 tpm_clear_and_reenable(struct udevice *dev);
 
@@ -230,11 +240,21 @@ u32 tpm_clear_and_reenable(struct udevice *dev);
  * @dev:       Device to check
  * @buf:       Buffer to put the string
  * @size:      Maximum size of buffer
- * @return length of string, or -ENOSPC it no space
+ * Return: length of string, or -ENOSPC it no space
  */
 int tpm_get_desc(struct udevice *dev, char *buf, int size);
 
 /**
+ * tpm_report_state() - Collect information about the current TPM state
+ *
+ * @dev:       Device to check
+ * @buf:       Buffer to put the string
+ * @size:      Maximum size of buffer
+ * Return: return code of the operation (0 = success)
+ */
+int tpm_report_state(struct udevice *dev, char *buf, int size);
+
+/**
  * tpm_xfer() - send data to the TPM and get response
  *
  * This first uses the device's send() method to send the bytes. Then it calls
@@ -263,14 +283,14 @@ int tpm_xfer(struct udevice *dev, const u8 *sendbuf, size_t send_size,
  * Initialize TPM device.  It must be called before any TPM commands.
  *
  * @dev - TPM device
- * @return 0 on success, non-0 on error.
+ * Return: 0 on success, non-0 on error.
  */
 int tpm_init(struct udevice *dev);
 
 /**
  * Retrieve the array containing all the v1 (resp. v2) commands.
  *
- * @return a struct cmd_tbl array.
+ * Return: a struct cmd_tbl array.
  */
 #if defined(CONFIG_TPM_V1)
 struct cmd_tbl *get_tpm1_commands(unsigned int *size);
@@ -296,7 +316,7 @@ static inline struct cmd_tbl *get_tpm2_commands(unsigned int *size)
  * it supports.
  *
  * @dev: TPM device
- * @return version number (TPM_V1 or TPMV2)
+ * Return: version number (TPM_V1 or TPMV2)
  */
 enum tpm_version tpm_get_version(struct udevice *dev);