Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b3e5baa8850947b2cc15f323783ddb04dc4bffa Commit: 1b3e5baa8850947b2cc15f323783ddb04dc4bffa Parent: 5864ae03ca982fb60bedeebfd67562db37c1ee6a Author: Rodolfo Giometti <[EMAIL PROTECTED]> AuthorDate: Sun Jan 27 18:14:45 2008 +0100 Committer: Jean Delvare <[EMAIL PROTECTED]> CommitDate: Sun Jan 27 18:14:45 2008 +0100
i2c/tsl2550: Add power management added Signed-off-by: Rodolfo Giometti <[EMAIL PROTECTED]> Signed-off-by: Jean Delvare <[EMAIL PROTECTED]> --- drivers/i2c/chips/tsl2550.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/chips/tsl2550.c b/drivers/i2c/chips/tsl2550.c index 3de4b19..a10fd27 100644 --- a/drivers/i2c/chips/tsl2550.c +++ b/drivers/i2c/chips/tsl2550.c @@ -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), }; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html