Re: [PATCH 1/1] driver: Tpm hardware enablement

Ian Campbell
2004-12-10T16:02:00Z

On Fri, 2004-12-10 at 09:28 -0600, Kylene Hall wrote:
> Good point. Splitting this out (esp. because there will be more in the
> future) is a good idea. What is the usual way to do this? For example,
> what function in the chip specific file would call
> register_tpm_hardware, how do I make sure that gets called etc.

I guess you could have multiple modules, one providing the generic code
and the dev interface etc (tpm.ko) and then one per hardware chip
(tmp-nsc.ko, tpm-atmel.ko, tpm-atmel-i2c.ko).

The hardware modules can then call tpm_register_hardware() in their
module_init function.

Perhaps it would make sense to put the PCI bus stuff and things like
that in the hardware module as well, since e.g. an i2c chip would not
fit into that model

Ian.
--
Ian Campbell, Senior Design Engineer
Web: http://www.arcom.com
Arcom, Clifton Road, Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom Phone: +44 (0)1223 411 200