MFD: ucb1x00-core: add wakeup support
Add genirq wakeup support for the ucb1x00 device. This allows an
attached gpio_keys driver to wakeup the system. Touchscreen is also
possible.
When there are no wakeup sources, ask the platform to assert the reset
signal to avoid any unexpected behaviour; this also puts the reset
signal at the right level when power is removed from the device.
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index 6fb9074..28af417 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -106,6 +106,8 @@
enum ucb1x00_reset {
UCB_RST_PROBE,
+ UCB_RST_RESUME,
+ UCB_RST_SUSPEND,
UCB_RST_REMOVE,
UCB_RST_PROBE_FAIL,
};
@@ -114,6 +116,7 @@
void (*reset)(enum ucb1x00_reset);
unsigned irq_base;
int gpio_base;
+ unsigned can_wakeup;
};
struct ucb1x00 {
@@ -130,6 +133,7 @@
u16 irq_fal_enbl;
u16 irq_ris_enbl;
u16 irq_mask;
+ u16 irq_wake;
struct device dev;
struct list_head node;
struct list_head devs;