[PATCH v8 2/8] tpm: two-phase chip management functions

2014-12-03 Thread Jarkko Sakkinen
tpm_register_hardware() and tpm_remove_hardware() are called often before initializing the device. The problem is that the device might not be fully initialized when it comes visible to the user space. This patch resolves the issue by diving initialization into two parts: - tpmm_chip_alloc() crea

[PATCH v8 2/8] tpm: two-phase chip management functions

2014-12-02 Thread Jarkko Sakkinen
tpm_register_hardware() and tpm_remove_hardware() are called often before initializing the device. This is wrong order since it could be that main TPM driver needs a fully initialized chip to be able to do its job. For example, now it is impossible to move common startup functions such as tpm_do_se