brintos

brintos / linux-shallow public Read only

0
0
Text · 1.0 KiB · 5acc85f Raw
42 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * STMicroelectronics TPM Linux driver for TPM ST33ZP244 * Copyright (C) 2009 - 2016  STMicroelectronics5 */6 7#ifndef __LOCAL_ST33ZP24_H__8#define __LOCAL_ST33ZP24_H__9 10#define TPM_ST33_I2C		"st33zp24-i2c"11#define TPM_ST33_SPI		"st33zp24-spi"12 13#define TPM_WRITE_DIRECTION	0x8014#define ST33ZP24_BUFSIZE	204815 16struct st33zp24_dev {17	struct tpm_chip *chip;18	void *phy_id;19	const struct st33zp24_phy_ops *ops;20	int locality;21	int irq;22	u32 intrs;23	struct gpio_desc *io_lpcpd;24	wait_queue_head_t read_queue;25};26 27 28struct 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);31};32 33#ifdef CONFIG_PM_SLEEP34int st33zp24_pm_suspend(struct device *dev);35int st33zp24_pm_resume(struct device *dev);36#endif37 38int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,39		   struct device *dev, int irq);40void st33zp24_remove(struct tpm_chip *chip);41#endif /* __LOCAL_ST33ZP24_H__ */42