Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > Break sysfs attributes into common and TPM 1.2/2.0-specific, and > create sysfs groups for TPM2.0. I agree with Jasons comments and wait for revised version. /Jarkko > Signed-off-by: Andrey Pronin > --- >

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > Break sysfs attributes into common and TPM 1.2/2.0-specific, and > create sysfs groups for TPM2.0. I agree with Jasons comments and wait for revised version. /Jarkko > Signed-off-by: Andrey Pronin > --- >

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-15 Thread Jason Gunthorpe
On Fri, Jul 15, 2016 at 09:56:58AM -0700, Andrey Pronin wrote: > On Thu, Jul 14, 2016 at 09:34:39PM -0600, Jason Gunthorpe wrote: > > On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > > > > > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > > > just add

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-15 Thread Jason Gunthorpe
On Fri, Jul 15, 2016 at 09:56:58AM -0700, Andrey Pronin wrote: > On Thu, Jul 14, 2016 at 09:34:39PM -0600, Jason Gunthorpe wrote: > > On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > > > > > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > > > just add

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-15 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:34:39PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > > > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > > just add those separately for tpm2 to groups[1] and keep groups[0] empty? Just

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-15 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:34:39PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > > > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > > just add those separately for tpm2 to groups[1] and keep groups[0] empty? Just

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > just add those separately for tpm2 to groups[1] and keep groups[0] empty? I think so. Since the file never exists for tpm2, nothing coded for tpm2 will ever

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 08:32:01PM -0700, Andrey Pronin wrote: > tpm2 shares some of the attributes with tpm1 (e.g. timeouts). Do I still > just add those separately for tpm2 to groups[1] and keep groups[0] empty? I think so. Since the file never exists for tpm2, nothing coded for tpm2 will ever

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:21:45PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > > - sysfs_remove_link(>dev.parent->kobj, "ppi"); > > - > > - for (i = chip->groups[0]->attrs; *i != NULL; ++i) > > -

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:21:45PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > > - sysfs_remove_link(>dev.parent->kobj, "ppi"); > > - > > - for (i = chip->groups[0]->attrs; *i != NULL; ++i) > > -

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > - sysfs_remove_link(>dev.parent->kobj, "ppi"); > - > - for (i = chip->groups[0]->attrs; *i != NULL; ++i) > - sysfs_remove_link(>dev.parent->kobj, (*i)->name); > + for (ngrp = 0; ngrp < chip->groups_cnt;

Re: [PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:51:35PM -0700, Andrey Pronin wrote: > - sysfs_remove_link(>dev.parent->kobj, "ppi"); > - > - for (i = chip->groups[0]->attrs; *i != NULL; ++i) > - sysfs_remove_link(>dev.parent->kobj, (*i)->name); > + for (ngrp = 0; ngrp < chip->groups_cnt;

[PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Andrey Pronin
Break sysfs attributes into common and TPM 1.2/2.0-specific, and create sysfs groups for TPM2.0. Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm-chip.c | 48 drivers/char/tpm/tpm-sysfs.c | 24 -- 2

[PATCH 1/2] tpm: add sysfs attributes for tpm2

2016-07-14 Thread Andrey Pronin
Break sysfs attributes into common and TPM 1.2/2.0-specific, and create sysfs groups for TPM2.0. Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm-chip.c | 48 drivers/char/tpm/tpm-sysfs.c | 24 -- 2 files changed, 53