lkml.org 
[lkml]   [2012]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x
On Thu, Dec 06, 2012 at 01:10:32AM +0100, Peter Hüwe wrote:
> Am Donnerstag, 6. Dezember 2012, 00:09:41 schrieb Kent Yoder:
> > >
> > > > static int tpm_st33_i2c_pm_suspend(struct i2c_client *client,
> > > > pm_message_t mesg)
> > > >
> > > >...
> > > >
> > > > static int tpm_st33_i2c_pm_resume(struct i2c_client *client)
> > > >
> > > >,,,
> > > >static struct i2c_driver tpm_st33_i2c_driver = {
> > > >
> > > > .driver = {
> > > >
> > > > .owner = THIS_MODULE,
> > > > .name = TPM_ST33_I2C,
> > > > },
> > > >
> > > > .probe = tpm_st33_i2c_probe,
> > > > .remove = tpm_st33_i2c_remove,
> > > > .resume = tpm_st33_i2c_pm_resume,
> > > > .suspend = tpm_st33_i2c_pm_suspend,
> > > > .id_table = tpm_st33_i2c_id
> > > >
> > > >};
> > >
> > > Please convert resume/suspend to .driver.pm
> > >
> > > It's pretty easy.
> > > See this post for details
> > > http://sourceforge.net/mailarchive/message.php?msg_id=29516784
> > > Rafael did spent quite a lot of effort to convert almost every driver
> > > back then, so we should 'fix' new ones.
> >
> > Not sure how easy this will be considering these routines are
> > i2c-specific -- they don't just call the tpm_tpm_* functions like the
> > other drivers.
>
> Why are they really i2c-specific?
> The only i2c specific part is the i2c_get_clientdata - which calls
> get_dev_drvdata internally.
> And I since we already get the correct struct device we don't need to use
> TPM_VPRIV in order to access the platform data.

I was referring to the power mgmt stuff. Those functions take struct
device, not a i2c_client *.

Kent

> I'll send a patch - see next email.
> @Matthias: can you please test this? As I cannot do this.
>
>
> Thanks,
> Peter
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-06 16:42    [W:0.111 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site