Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77313
b: refs/heads/master
c: 1b3e5ba
h: refs/heads/master
i:
  77311: 543be86
v: v3
  • Loading branch information
Rodolfo Giometti authored and Jean Delvare committed Jan 27, 2008
1 parent 2f3580a commit cfeadb3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5864ae03ca982fb60bedeebfd67562db37c1ee6a
refs/heads/master: 1b3e5baa8850947b2cc15f323783ddb04dc4bffa
21 changes: 21 additions & 0 deletions trunk/drivers/i2c/chips/tsl2550.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,32 @@ static int __devexit tsl2550_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM

static int tsl2550_suspend(struct i2c_client *client, pm_message_t mesg)
{
return tsl2550_set_power_state(client, 0);
}

static int tsl2550_resume(struct i2c_client *client)
{
return tsl2550_set_power_state(client, 1);
}

#else

#define tsl2550_suspend NULL
#define tsl2550_resume NULL

#endif /* CONFIG_PM */

static struct i2c_driver tsl2550_driver = {
.driver = {
.name = TSL2550_DRV_NAME,
.owner = THIS_MODULE,
},
.suspend = tsl2550_suspend,
.resume = tsl2550_resume,
.probe = tsl2550_probe,
.remove = __devexit_p(tsl2550_remove),
};
Expand Down

0 comments on commit cfeadb3

Please sign in to comment.