of: i2c: add support for wakeup-source property
authorOlof Johansson <olofj@chromium.org>
Sat, 21 Jul 2012 18:49:39 +0000 (11:49 -0700)
committerGerrit <chrome-bot@google.com>
Sat, 21 Jul 2012 23:17:30 +0000 (16:17 -0700)
commitc2634b889fdc498757bef718e13e2bf75dfee29d
treed8612a1f6ef556a14668a6cc96b9d167238496f8
parent0ce824bab58fcbb2f3d26237c74a83e7ed441be2
of: i2c: add support for wakeup-source property

Add support for specifying a generic "wakeup-source" property on i2c
clients, which will set the I2C_CLIENT_WAKE flag, thus configuring the
device to wake the system from suspend (via IRQ).

This obviously doesn't make sense on devices lacking IRQ, but since we
still allow that in the i2c_board_info case, I don't see a reason to
restrict it here.

Note: Since the generic i2c bindings aren't documented in the kernel,
I didn't find a good place to add documentation for this binding
extension. I still think it makes sense to have a generic property
instead of having each device do its own binding for the same.

BUG=chrome-os-partner:8921
TEST=make sure trackpad, keyboard and rtc wakes snow

Change-Id: Ia7b2d06203545c278d154cdc07f64e7db8f37786
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28123
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
drivers/of/of_i2c.c