st33zp24.h 959 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * STMicroelectronics TPM Linux driver for TPM ST33ZP24
  4. * Copyright (C) 2009 - 2016 STMicroelectronics
  5. */
  6. #ifndef __LOCAL_ST33ZP24_H__
  7. #define __LOCAL_ST33ZP24_H__
  8. #define TPM_WRITE_DIRECTION 0x80
  9. #define ST33ZP24_BUFSIZE 2048
  10. struct st33zp24_dev {
  11. struct tpm_chip *chip;
  12. void *phy_id;
  13. const struct st33zp24_phy_ops *ops;
  14. int locality;
  15. int irq;
  16. u32 intrs;
  17. int io_lpcpd;
  18. wait_queue_head_t read_queue;
  19. };
  20. struct st33zp24_phy_ops {
  21. int (*send)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
  22. int (*recv)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
  23. };
  24. #ifdef CONFIG_PM_SLEEP
  25. int st33zp24_pm_suspend(struct device *dev);
  26. int st33zp24_pm_resume(struct device *dev);
  27. #endif
  28. int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
  29. struct device *dev, int irq, int io_lpcpd);
  30. void st33zp24_remove(struct tpm_chip *chip);
  31. #endif /* __LOCAL_ST33ZP24_H__ */