xref: /openbmc/linux/drivers/char/tpm/st33zp24/st33zp24.h (revision bf38b8710892333cec2d8069644eb36ff435fd6f)
1*bf38b871SChristophe Ricard /*
2*bf38b871SChristophe Ricard  * STMicroelectronics TPM Linux driver for TPM ST33ZP24
3*bf38b871SChristophe Ricard  * Copyright (C) 2009 - 2015  STMicroelectronics
4*bf38b871SChristophe Ricard  *
5*bf38b871SChristophe Ricard  * This program is free software; you can redistribute it and/or modify it
6*bf38b871SChristophe Ricard  * under the terms and conditions of the GNU General Public License,
7*bf38b871SChristophe Ricard  * version 2, as published by the Free Software Foundation.
8*bf38b871SChristophe Ricard  *
9*bf38b871SChristophe Ricard  * This program is distributed in the hope that it will be useful,
10*bf38b871SChristophe Ricard  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*bf38b871SChristophe Ricard  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12*bf38b871SChristophe Ricard  * GNU General Public License for more details.
13*bf38b871SChristophe Ricard  *
14*bf38b871SChristophe Ricard  * You should have received a copy of the GNU General Public License
15*bf38b871SChristophe Ricard  * along with this program; if not, see <http://www.gnu.org/licenses/>.
16*bf38b871SChristophe Ricard  */
17*bf38b871SChristophe Ricard 
18*bf38b871SChristophe Ricard #ifndef __LOCAL_ST33ZP24_H__
19*bf38b871SChristophe Ricard #define __LOCAL_ST33ZP24_H__
20*bf38b871SChristophe Ricard 
21*bf38b871SChristophe Ricard struct st33zp24_phy_ops {
22*bf38b871SChristophe Ricard 	int (*send)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
23*bf38b871SChristophe Ricard 	int (*recv)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
24*bf38b871SChristophe Ricard };
25*bf38b871SChristophe Ricard 
26*bf38b871SChristophe Ricard #ifdef CONFIG_PM_SLEEP
27*bf38b871SChristophe Ricard int st33zp24_pm_suspend(struct device *dev);
28*bf38b871SChristophe Ricard int st33zp24_pm_resume(struct device *dev);
29*bf38b871SChristophe Ricard #endif
30*bf38b871SChristophe Ricard 
31*bf38b871SChristophe Ricard int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
32*bf38b871SChristophe Ricard 		   struct device *dev, int irq, int io_lpcpd);
33*bf38b871SChristophe Ricard int st33zp24_remove(struct tpm_chip *chip);
34*bf38b871SChristophe Ricard #endif /* __LOCAL_ST33ZP24_H__ */
35