I have tried to get probing of TIS with interrupts to work on a module
and I am wondering whether it works for anyone. I noticed it tries to
probe while locality 0 is released and the TPM_CHIP_FLAG_IRQ is never
set, so it never gets to certain places in the code. To get it to work I
had to add a patch like this one here to tpm_tis_core_init:
@ -981,11 +1023,16 @@ int tpm_tis_core_init(struct device *dev, struct
tpm_tis_data *priv, int irq,
}
if (irq) {
+ tpm_chip_start(chip);
+ printk(KERN_INFO "%s %d: chip->flags &
TPM_CHIP_FLAG_IRQ = %x\n",
+ __func__, __LINE__, chip->flags &
TPM_CHIP_FLAG_IRQ);
+ chip->flags |= TPM_CHIP_FLAG_IRQ;
tpm_tis_probe_irq_single(chip, intmask,
IRQF_SHARED,
irq);
if (!(chip->flags & TPM_CHIP_FLAG_IRQ))
dev_err(&chip->dev, FW_BUG
"TPM interrupt not working,
polling instead\n");
+ tpm_chip_stop(chip);
} else {
tpm_tis_probe_irq(chip, intmask);
}
Can this be right ?
Stefan