Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-06 Thread Jarkko Sakkinen
On Wed, Nov 05, 2014 at 10:48:36AM -0700, Jason Gunthorpe wrote: > On Wed, Nov 05, 2014 at 09:40:29AM +0200, Jarkko Sakkinen wrote: > > > > I mean, if we have a patch that does: > > > > > > struct tpm_chip { > > >struct device cdev; // the class device > > >struct device *pdev; // the 'p

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-05 Thread Jason Gunthorpe
On Wed, Nov 05, 2014 at 09:40:29AM +0200, Jarkko Sakkinen wrote: > > I mean, if we have a patch that does: > > > > struct tpm_chip { > >struct device cdev; // the class device > >struct device *pdev; // the 'platform' device chip is bound too > > > >struct device *dev = pdev; // Tem

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jarkko Sakkinen
On Tue, Nov 04, 2014 at 11:14:33AM -0700, Jason Gunthorpe wrote: > On Tue, Nov 04, 2014 at 01:47:34PM +0200, Jarkko Sakkinen wrote: > > > > > I used the class 'tpm' only for TPM 2.x because I didn't want to > > > > break the binary compatibility for TPM 1.x anyway. In ideal situtation > > > > both

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jarkko Sakkinen
On Tue, Nov 04, 2014 at 01:49:18PM -0700, Jason Gunthorpe wrote: > On Tue, Nov 04, 2014 at 10:38:43PM +0200, Jarkko Sakkinen wrote: > > > > Then a patch: Drop misc_register entirely, no compat stuff. Explain > > > clearly the resulting sysfs changes, CC the various people who monitor > > > the sys

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jason Gunthorpe
On Tue, Nov 04, 2014 at 10:38:43PM +0200, Jarkko Sakkinen wrote: > > Then a patch: Drop misc_register entirely, no compat stuff. Explain > > clearly the resulting sysfs changes, CC the various people who monitor > > the sysfs API, act on any feedback. I'm hoping it is an OK change. > > [ If it is

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jarkko Sakkinen
On Tue, Nov 04, 2014 at 11:14:33AM -0700, Jason Gunthorpe wrote: > On Tue, Nov 04, 2014 at 01:47:34PM +0200, Jarkko Sakkinen wrote: > > > > > I used the class 'tpm' only for TPM 2.x because I didn't want to > > > > break the binary compatibility for TPM 1.x anyway. In ideal situtation > > > > both

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jason Gunthorpe
On Tue, Nov 04, 2014 at 01:47:34PM +0200, Jarkko Sakkinen wrote: > > > I used the class 'tpm' only for TPM 2.x because I didn't want to > > > break the binary compatibility for TPM 1.x anyway. In ideal situtation > > > both would be character devices inside the class 'tpm' and there would > > > be

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jarkko Sakkinen
On Tue, Nov 04, 2014 at 01:47:34PM +0200, Jarkko Sakkinen wrote: > On Mon, 2014-11-03 at 14:38 -0700, Jason Gunthorpe wrote: > > On Mon, Nov 03, 2014 at 07:41:01AM +0200, Jarkko Sakkinen wrote: > > > > > I used the class 'tpm' only for TPM 2.x because I didn't want to > > > break the binary compat

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-04 Thread Jarkko Sakkinen
On Mon, 2014-11-03 at 14:38 -0700, Jason Gunthorpe wrote: > On Mon, Nov 03, 2014 at 07:41:01AM +0200, Jarkko Sakkinen wrote: > > > I used the class 'tpm' only for TPM 2.x because I didn't want to > > break the binary compatibility for TPM 1.x anyway. In ideal situtation > > both would be character

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-03 Thread Jason Gunthorpe
On Mon, Nov 03, 2014 at 07:41:01AM +0200, Jarkko Sakkinen wrote: > I used the class 'tpm' only for TPM 2.x because I didn't want to > break the binary compatibility for TPM 1.x anyway. In ideal situtation > both would be character devices inside the class 'tpm' and there would > be sysfs attribute

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-02 Thread Jarkko Sakkinen
On Sun, Nov 02, 2014 at 02:33:05PM -0700, Jason Gunthorpe wrote: > On Sat, Nov 01, 2014 at 11:01:35AM +0200, Jarkko Sakkinen wrote: > > Added own class for TPM devices that is used for TPM 2.0 and onwards. > > For TPM1 old device structure is kept for backwards compatibility. > > > > Each struct t

Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

2014-11-02 Thread Jason Gunthorpe
On Sat, Nov 01, 2014 at 11:01:35AM +0200, Jarkko Sakkinen wrote: > Added own class for TPM devices that is used for TPM 2.0 and onwards. > For TPM1 old device structure is kept for backwards compatibility. > > Each struct tpm_chip represents a character device that is associated > to the tpm devic