Lines Matching defs:loc
312 static bool check_locality(struct tpm_chip *chip, int loc)
317 rc = iic_tpm_read(TPM_ACCESS(loc), &buf, 1);
323 tpm_dev.locality = loc;
331 static void release_locality(struct tpm_chip *chip, int loc, int force)
334 if (iic_tpm_read(TPM_ACCESS(loc), &buf, 1) < 0)
340 iic_tpm_write(TPM_ACCESS(loc), &buf, 1);
344 static int request_locality(struct tpm_chip *chip, int loc)
349 if (check_locality(chip, loc))
350 return loc;
352 iic_tpm_write(TPM_ACCESS(loc), &buf, 1);
357 if (check_locality(chip, loc))
358 return loc;