Lines Matching refs:tpm_chip

31 struct tpm_chip;
88 bool (*req_canceled)(struct tpm_chip *chip, u8 status);
89 int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len);
90 int (*send) (struct tpm_chip *chip, u8 *buf, size_t len);
91 void (*cancel) (struct tpm_chip *chip);
92 u8 (*status) (struct tpm_chip *chip);
93 void (*update_timeouts)(struct tpm_chip *chip,
95 void (*update_durations)(struct tpm_chip *chip,
97 int (*go_idle)(struct tpm_chip *chip);
98 int (*cmd_ready)(struct tpm_chip *chip);
99 int (*request_locality)(struct tpm_chip *chip, int loc);
100 int (*relinquish_locality)(struct tpm_chip *chip, int loc);
101 void (*clk_enable)(struct tpm_chip *chip, bool value);
132 struct tpm_chip *chip;
150 struct tpm_chip {
353 #define to_tpm_chip(d) container_of(d, struct tpm_chip, dev)
445 static inline bool tpm_is_firmware_upgrade(struct tpm_chip *chip)
457 extern int tpm_is_tpm2(struct tpm_chip *chip);
458 extern __must_check int tpm_try_get_ops(struct tpm_chip *chip);
459 extern void tpm_put_ops(struct tpm_chip *chip);
460 extern ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_buf *buf,
462 extern int tpm_pcr_read(struct tpm_chip *chip, u32 pcr_idx,
464 extern int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
466 extern int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max);
467 extern struct tpm_chip *tpm_default_chip(void);
468 void tpm2_flush_context(struct tpm_chip *chip, u32 handle);
480 static inline int tpm_is_tpm2(struct tpm_chip *chip)
484 static inline int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx,
490 static inline int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
496 static inline int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max)
501 static inline struct tpm_chip *tpm_default_chip(void)
512 int tpm2_start_auth_session(struct tpm_chip *chip);
513 void tpm_buf_append_name(struct tpm_chip *chip, struct tpm_buf *buf,
515 void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf,
518 static inline void tpm_buf_append_hmac_session_opt(struct tpm_chip *chip,
527 void tpm_buf_fill_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf);
528 int tpm_buf_check_hmac_response(struct tpm_chip *chip, struct tpm_buf *buf,
530 void tpm2_end_auth_session(struct tpm_chip *chip);
534 static inline int tpm2_start_auth_session(struct tpm_chip *chip)
538 static inline void tpm2_end_auth_session(struct tpm_chip *chip)
541 static inline void tpm_buf_append_name(struct tpm_chip *chip,
549 static inline void tpm_buf_append_hmac_session(struct tpm_chip *chip,
575 static inline void tpm_buf_append_hmac_session_opt(struct tpm_chip *chip,
591 static inline void tpm_buf_fill_hmac_session(struct tpm_chip *chip,
595 static inline int tpm_buf_check_hmac_response(struct tpm_chip *chip,