Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 08:35:30PM -0700, Andrey Pronin wrote: > On Thu, Jul 14, 2016 at 09:23:27PM -0600, Jason Gunthorpe wrote: > > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > > - WARN_ON(chip->groups_cnt != 0); > > > > Nope. > > > > > - const struct attribute_group

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 08:35:30PM -0700, Andrey Pronin wrote: > On Thu, Jul 14, 2016 at 09:23:27PM -0600, Jason Gunthorpe wrote: > > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > > - WARN_ON(chip->groups_cnt != 0); > > > > Nope. > > > > > - const struct attribute_group

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Andrey Pronin
On Mon, Jul 18, 2016 at 10:11:41PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > Add attr_group to phy_ops that a driver relying on tpm_tis_core_init > > can set to have its specific attributes registered in sysfs. > > > > Signed-off-by: Andrey

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Andrey Pronin
On Mon, Jul 18, 2016 at 10:11:41PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > Add attr_group to phy_ops that a driver relying on tpm_tis_core_init > > can set to have its specific attributes registered in sysfs. > > > > Signed-off-by: Andrey

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > Add attr_group to phy_ops that a driver relying on tpm_tis_core_init > can set to have its specific attributes registered in sysfs. > > Signed-off-by: Andrey Pronin > --- > drivers/char/tpm/tpm-sysfs.c| 1

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > Add attr_group to phy_ops that a driver relying on tpm_tis_core_init > can set to have its specific attributes registered in sysfs. > > Signed-off-by: Andrey Pronin > --- > drivers/char/tpm/tpm-sysfs.c| 1 - >

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:23:27PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > - WARN_ON(chip->groups_cnt != 0); > > Nope. > > > - const struct attribute_group *groups[3]; > > + /* up to 4 attribute groups: > > +* - driver-specific

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:23:27PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > > - WARN_ON(chip->groups_cnt != 0); > > Nope. > > > - const struct attribute_group *groups[3]; > > + /* up to 4 attribute groups: > > +* - driver-specific

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > - WARN_ON(chip->groups_cnt != 0); Nope. > - const struct attribute_group *groups[3]; > + /* up to 4 attribute groups: > + * - driver-specific > + * - common TPM1.2 and TPM2.0 > + * - TPM1.2/2.0-specific >

Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > - WARN_ON(chip->groups_cnt != 0); Nope. > - const struct attribute_group *groups[3]; > + /* up to 4 attribute groups: > + * - driver-specific > + * - common TPM1.2 and TPM2.0 > + * - TPM1.2/2.0-specific >

[PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Andrey Pronin
Add attr_group to phy_ops that a driver relying on tpm_tis_core_init can set to have its specific attributes registered in sysfs. Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm-sysfs.c| 1 - drivers/char/tpm/tpm.h | 8 +++-

[PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core

2016-07-14 Thread Andrey Pronin
Add attr_group to phy_ops that a driver relying on tpm_tis_core_init can set to have its specific attributes registered in sysfs. Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm-sysfs.c| 1 - drivers/char/tpm/tpm.h | 8 +++- drivers/char/tpm/tpm_tis_core.c | 3 +++