diff options
author | Kylene Jo Hall <kjhall@us.ibm.com> | 2006-04-22 05:37:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-22 12:19:54 -0400 |
commit | 08e96e486dd1345ae0ad70247387d0d4fd346889 (patch) | |
tree | 25dbff8ebc7ec35d476917ccc1f8c54808e79bea /drivers/char/tpm/tpm.h | |
parent | 9e18ee19179a7742999d0e2d4bfcba75b5562439 (diff) |
[PATCH] tpm: new 1.2 sysfs files
Many of the sysfs files were calling the TPM_GetCapability command with array.
Since for 1.2 more sysfs files of this type are coming I am generalizing the
array so there can be one array and the unique parts can be filled in just
before the command is called.
This updated version of the patch breaks the multi-value sysfs file into
separate files pointed out by Greg. It also addresses the code redundancy and
ugliness in the tpm_show_* functions pointed out on another patch by Dave
Hansen.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r-- | drivers/char/tpm/tpm.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 1d28485b8fb3..75d105c4e65d 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -42,8 +42,18 @@ extern ssize_t tpm_show_pcrs(struct device *, struct device_attribute *attr, | |||
42 | char *); | 42 | char *); |
43 | extern ssize_t tpm_show_caps(struct device *, struct device_attribute *attr, | 43 | extern ssize_t tpm_show_caps(struct device *, struct device_attribute *attr, |
44 | char *); | 44 | char *); |
45 | extern ssize_t tpm_show_caps_1_2(struct device *, struct device_attribute *attr, | ||
46 | char *); | ||
45 | extern ssize_t tpm_store_cancel(struct device *, struct device_attribute *attr, | 47 | extern ssize_t tpm_store_cancel(struct device *, struct device_attribute *attr, |
46 | const char *, size_t); | 48 | const char *, size_t); |
49 | extern ssize_t tpm_show_enabled(struct device *, struct device_attribute *attr, | ||
50 | char *); | ||
51 | extern ssize_t tpm_show_active(struct device *, struct device_attribute *attr, | ||
52 | char *); | ||
53 | extern ssize_t tpm_show_owned(struct device *, struct device_attribute *attr, | ||
54 | char *); | ||
55 | extern ssize_t tpm_show_temp_deactivated(struct device *, | ||
56 | struct device_attribute *attr, char *); | ||
47 | 57 | ||
48 | struct tpm_chip; | 58 | struct tpm_chip; |
49 | 59 | ||
@@ -63,6 +73,7 @@ struct tpm_vendor_specific { | |||
63 | u8 (*status) (struct tpm_chip *); | 73 | u8 (*status) (struct tpm_chip *); |
64 | struct miscdevice miscdev; | 74 | struct miscdevice miscdev; |
65 | struct attribute_group *attr_group; | 75 | struct attribute_group *attr_group; |
76 | u32 timeout_a, timeout_b, timeout_c, timeout_d; | ||
66 | u32 duration[3]; | 77 | u32 duration[3]; |
67 | }; | 78 | }; |
68 | 79 | ||
@@ -101,6 +112,9 @@ static inline void tpm_write_index(int base, int index, int value) | |||
101 | outb(value & 0xFF, base+1); | 112 | outb(value & 0xFF, base+1); |
102 | } | 113 | } |
103 | 114 | ||
115 | extern void tpm_get_timeouts(struct tpm_chip *); | ||
116 | extern void tpm_gen_interrupt(struct tpm_chip *); | ||
117 | extern void tpm_continue_selftest(struct tpm_chip *); | ||
104 | extern unsigned long tpm_calc_ordinal_duration(struct tpm_chip *, u32); | 118 | extern unsigned long tpm_calc_ordinal_duration(struct tpm_chip *, u32); |
105 | extern struct tpm_chip* tpm_register_hardware(struct device *, | 119 | extern struct tpm_chip* tpm_register_hardware(struct device *, |
106 | const struct tpm_vendor_specific *); | 120 | const struct tpm_vendor_specific *); |