lkml.org 
[lkml]   [2012]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x
Date
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'll send a patch - see next email.
@Matthias: can you please test this? As I cannot do this.


Thanks,
Peter




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