tpm: Fix some name collisions with drivers/char/tpm.h
[platform/kernel/linux-rpi.git] / drivers / char / tpm / tpm_i2c_nuvoton.c
index b8defdf..2803080 100644 (file)
 #include "tpm.h"
 
 /* I2C interface offsets */
-#define TPM_STS                0x00
-#define TPM_BURST_COUNT        0x01
-#define TPM_DATA_FIFO_W        0x20
-#define TPM_DATA_FIFO_R        0x40
-#define TPM_VID_DID_RID        0x60
-/* TPM command header size */
-#define TPM_HEADER_SIZE        10
-#define TPM_RETRY      5
+#define TPM_STS                        0x00
+#define TPM_BURST_COUNT                0x01
+#define TPM_DATA_FIFO_W                0x20
+#define TPM_DATA_FIFO_R                0x40
+#define TPM_VID_DID_RID                0x60
+#define TPM_I2C_RETRIES                5
 /*
  * I2C bus device maximum buffer size w/o counting I2C address or command
  * i.e. max size required for I2C write is 34 = addr, command, 32 bytes data
@@ -292,7 +290,7 @@ static int i2c_nuvoton_recv(struct tpm_chip *chip, u8 *buf, size_t count)
                dev_err(dev, "%s() count < header size\n", __func__);
                return -EIO;
        }
-       for (retries = 0; retries < TPM_RETRY; retries++) {
+       for (retries = 0; retries < TPM_I2C_RETRIES; retries++) {
                if (retries > 0) {
                        /* if this is not the first trial, set responseRetry */
                        i2c_nuvoton_write_status(client,