Signed-off-by: Andrew Morton --- drivers/i2c/i2c-core.c | 4 +++- include/linux/i2c.h | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff -puN drivers/i2c/i2c-core.c~jdelvare-i2c-i2c-new-style-devices-can-support-wakeup-flags drivers/i2c/i2c-core.c --- a/drivers/i2c/i2c-core.c~jdelvare-i2c-i2c-new-style-devices-can-support-wakeup-flags +++ a/drivers/i2c/i2c-core.c @@ -226,7 +226,9 @@ i2c_new_device(struct i2c_adapter *adap, 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; diff -puN include/linux/i2c.h~jdelvare-i2c-i2c-new-style-devices-can-support-wakeup-flags include/linux/i2c.h --- a/include/linux/i2c.h~jdelvare-i2c-i2c-new-style-devices-can-support-wakeup-flags +++ a/include/linux/i2c.h @@ -342,9 +342,10 @@ static inline void i2c_set_adapdata (str } /*flags for the client struct: */ -#define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ -#define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ - /* Must equal I2C_M_TEN below */ +#define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ +#define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ + /* Must equal I2C_M_TEN below */ +#define I2C_CLIENT_WAKE 0x80 /* for board_info; true iff can wake */ /* i2c adapter classes (bitmask) */ #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ _