1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * STMicroelectronics TPM Linux driver for TPM ST33ZP24
4 * Copyright (C) 2009 - 2016 STMicroelectronics
7 #ifndef __LOCAL_ST33ZP24_H__
8 #define __LOCAL_ST33ZP24_H__
10 #define TPM_ST33_I2C "st33zp24-i2c"
11 #define TPM_ST33_SPI "st33zp24-spi"
13 #define TPM_WRITE_DIRECTION 0x80
14 #define ST33ZP24_BUFSIZE 2048
17 struct tpm_chip
*chip
;
19 const struct st33zp24_phy_ops
*ops
;
23 struct gpio_desc
*io_lpcpd
;
24 wait_queue_head_t read_queue
;
28 struct st33zp24_phy_ops
{
29 int (*send
)(void *phy_id
, u8 tpm_register
, u8
*tpm_data
, int tpm_size
);
30 int (*recv
)(void *phy_id
, u8 tpm_register
, u8
*tpm_data
, int tpm_size
);
33 #ifdef CONFIG_PM_SLEEP
34 int st33zp24_pm_suspend(struct device
*dev
);
35 int st33zp24_pm_resume(struct device
*dev
);
38 int st33zp24_probe(void *phy_id
, const struct st33zp24_phy_ops
*ops
,
39 struct device
*dev
, int irq
);
40 void st33zp24_remove(struct tpm_chip
*chip
);
41 #endif /* __LOCAL_ST33ZP24_H__ */