mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
8ab547a2dc
* Rename TPM_BUFSIZE defined in drivers/char/tpm/st33zp24/st33zp24.h to ST33ZP24_BUFSIZE. * Rename TPM_BUFSIZE defined in drivers/char/tpm/tpm_i2c_infineon.c to TPM_I2C_INFINEON_BUFSIZE. * Rename TPM_RETRY in tpm_i2c_nuvoton to TPM_I2C_RETRIES. * Remove TPM_HEADER_SIZE from tpm_i2c_nuvoton. Cc: stable@vger.kernel.org Fixes:bf38b87108
("tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 layers (core + phy)") Fixes:aad628c1d9
("char/tpm: Add new driver for Infineon I2C TIS TPM") Fixes:32d33b29ba
("TPM: Retry SaveState command in suspend path") Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
/*
|
|
* STMicroelectronics TPM Linux driver for TPM ST33ZP24
|
|
* Copyright (C) 2009 - 2016 STMicroelectronics
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __LOCAL_ST33ZP24_H__
|
|
#define __LOCAL_ST33ZP24_H__
|
|
|
|
#define TPM_WRITE_DIRECTION 0x80
|
|
#define ST33ZP24_BUFSIZE 2048
|
|
|
|
struct st33zp24_dev {
|
|
struct tpm_chip *chip;
|
|
void *phy_id;
|
|
const struct st33zp24_phy_ops *ops;
|
|
int locality;
|
|
int irq;
|
|
u32 intrs;
|
|
int io_lpcpd;
|
|
wait_queue_head_t read_queue;
|
|
};
|
|
|
|
|
|
struct st33zp24_phy_ops {
|
|
int (*send)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
|
|
int (*recv)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
|
|
};
|
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
int st33zp24_pm_suspend(struct device *dev);
|
|
int st33zp24_pm_resume(struct device *dev);
|
|
#endif
|
|
|
|
int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
|
|
struct device *dev, int irq, int io_lpcpd);
|
|
int st33zp24_remove(struct tpm_chip *chip);
|
|
#endif /* __LOCAL_ST33ZP24_H__ */
|