From 77686517977e77d101c8a7b397717df00a88922b Mon Sep 17 00:00:00 2001 From: Sundar R Iyer Date: Sun, 5 Sep 2010 12:18:47 -0700 Subject: Input: add support for PowerOn button on the AB8500 MFD Add the PowerOn (PonKey) button support to detect power on/off events. Acked-by: Linus Walleij Signed-off-by: Sundar R Iyer Signed-off-by: Dmitry Torokhov --- drivers/mfd/ab8500-core.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'drivers/mfd/ab8500-core.c') diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index defa786dee34..b8c4b80e4c43 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -338,6 +338,21 @@ static struct resource ab8500_rtc_resources[] = { }, }; +static struct resource ab8500_poweronkey_db_resources[] = { + { + .name = "ONKEY_DBF", + .start = AB8500_INT_PON_KEY1DB_F, + .end = AB8500_INT_PON_KEY1DB_F, + .flags = IORESOURCE_IRQ, + }, + { + .name = "ONKEY_DBR", + .start = AB8500_INT_PON_KEY1DB_R, + .end = AB8500_INT_PON_KEY1DB_R, + .flags = IORESOURCE_IRQ, + }, +}; + static struct mfd_cell ab8500_devs[] = { { .name = "ab8500-gpadc", @@ -354,6 +369,11 @@ static struct mfd_cell ab8500_devs[] = { { .name = "ab8500-usb", }, { .name = "ab8500-pwm", }, { .name = "ab8500-regulator", }, + { + .name = "ab8500-poweron-key", + .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources), + .resources = ab8500_poweronkey_db_resources, + }, }; int __devinit ab8500_init(struct ab8500 *ab8500) -- cgit v1.2.3