aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-10-13 23:56:29 +0200
committerJean Delvare <khali@hyperion.delvare>2007-10-13 23:56:29 +0200
commit3bbb835d4c53faf0bca62f0e39835926bef40b1f (patch)
tree116a84eeb50d0406e18f4d733a1ba05d67f8fe86 /drivers/i2c/i2c-core.c
parentcee37ae4071740cb190d1ac4ddb7aa77484aa7b3 (diff)
i2c: New-style devices can support driver model wakeup flags
We need to be able to flag I2C devices, such as RTCs, which can issue wake events (usually through IRQ lines). This adds an i2c_board_info.flags bit, and uses it to initialize the i2c device node. (And shrinks a few lines that were overly long.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 910a62de190..06b4b9e1a23 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -226,7 +226,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
client->adapter = adap;
client->dev.platform_data = info->platform_data;
- client->flags = info->flags;
+ device_init_wakeup(&client->dev, info->flags & I2C_CLIENT_WAKE);
+
+ client->flags = info->flags & ~I2C_CLIENT_WAKE;
client->addr = info->addr;
client->irq = info->irq;