Lines Matching refs:chip
32 struct tpm_chip *chip;
41 chip = chip_seqops->chip;
42 get_device(&chip->dev);
49 seq->private = chip;
59 struct tpm_chip *chip = seq->private;
61 put_device(&chip->dev);
74 static int tpm_read_log(struct tpm_chip *chip)
78 if (chip->log.bios_event_log != NULL) {
79 dev_dbg(&chip->dev,
85 rc = tpm_read_log_acpi(chip);
89 rc = tpm_read_log_efi(chip);
93 return tpm_read_log_of(chip);
98 * @chip: TPM chip to use.
103 void tpm_bios_log_setup(struct tpm_chip *chip)
105 const char *name = dev_name(&chip->dev);
110 if (chip->flags & TPM_CHIP_FLAG_VIRTUAL)
113 rc = tpm_read_log(chip);
119 chip->bios_dir[cnt] = securityfs_create_dir(name, NULL);
123 if (IS_ERR(chip->bios_dir[cnt]))
127 chip->bin_log_seqops.chip = chip;
129 chip->bin_log_seqops.seqops =
132 chip->bin_log_seqops.seqops =
136 chip->bios_dir[cnt] =
138 0440, chip->bios_dir[0],
139 (void *)&chip->bin_log_seqops,
141 if (IS_ERR(chip->bios_dir[cnt]))
145 if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) {
147 chip->ascii_log_seqops.chip = chip;
148 chip->ascii_log_seqops.seqops =
151 chip->bios_dir[cnt] =
153 0440, chip->bios_dir[0],
154 (void *)&chip->ascii_log_seqops,
156 if (IS_ERR(chip->bios_dir[cnt]))
164 chip->bios_dir[cnt] = NULL;
165 tpm_bios_log_teardown(chip);
169 void tpm_bios_log_teardown(struct tpm_chip *chip)
181 if (chip->bios_dir[i]) {
182 inode = d_inode(chip->bios_dir[i]);
186 securityfs_remove(chip->bios_dir[i]);