st33zp24.h 1.3 KB

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