From patchwork Sun Jun 17 14:17:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9367 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F178F23E55 for ; Sun, 17 Jun 2012 14:18:02 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id B08EBA18054 for ; Sun, 17 Jun 2012 14:18:02 +0000 (UTC) Received: by obbun3 with SMTP id un3so7892186obb.11 for ; Sun, 17 Jun 2012 07:18:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=FKeSLwu2Ng6D2O89zHd21yhhMxjtwZmmh6ZAiUFKhmo=; b=Wqzgo1aKOafs7Uf/rfRuYj+z40w5K13KqzCvjILEDJPO91Y1PrTIwpn4tQFW74tP/O +mLl1F0X5TeZri0F8tYDMjB1bd15mgOdS8nP10267iX2ajNvg1rk62A4UCPv7MLJZXu8 hc8ihEj7uWhqVevGsxD7VEHSLRXct+pD7bB1vFlDAyLxTD3b1JqCLxiZpHwh+Dhi8Ov5 tSQU78eLz9DT3VCYAk0z4pwTCLO6z/3b0BYgJwkIXg9mH6+hcZMRuS9TtWAL6dJr0S1A rHzkiwX1ATqCLuMFCq4/UvEQBl0syMvFuAUQzkXicju+JamTRezo7mg81Hd0hSuOoLi1 /bdQ== Received: by 10.50.57.167 with SMTP id j7mr6137827igq.53.1339942682051; Sun, 17 Jun 2012 07:18:02 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp23819ibb; Sun, 17 Jun 2012 07:18:01 -0700 (PDT) Received: by 10.14.98.139 with SMTP id v11mr2713000eef.35.1339942680831; Sun, 17 Jun 2012 07:18:00 -0700 (PDT) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com. [207.126.144.123]) by mx.google.com with SMTP id s13si7121680eeb.38.2012.06.17.07.17.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jun 2012 07:18:00 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.123; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKT93nFgUWnGzGu8eA71SkL7m3adn/cWhW@postini.com; Sun, 17 Jun 2012 14:18:00 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 0A65740; Sun, 17 Jun 2012 14:17:32 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id B8D2848; Sun, 17 Jun 2012 11:25:46 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 2DD5924C07D; Sun, 17 Jun 2012 16:17:46 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sun, 17 Jun 2012 16:17:53 +0200 From: Linus Walleij To: Dmitry Torokhov Cc: , Naveen Kumar Gaddipati , Linus Walleij Subject: [PATCH 2/4] input/nomadik-ske: suspend and resume support Date: Sun, 17 Jun 2012 16:17:51 +0200 Message-ID: <1339942671-20121-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkPZTb5HRx+JAfMmALpTifTAdz/+7tfrJzFLIPWBIdH8NOSstw5dfBQ9FK7GkDkpAdkTKcx From: Naveen Kumar Gaddipati Suspend and resume support for ske keypad by using disable or enable of keypad. Signed-off-by: Naveen Kumar Gaddipati Reviewed-by: Srinidhi Kasagar Signed-off-by: Linus Walleij --- drivers/input/keyboard/nomadik-ske-keypad.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 6857454..68c36a7 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -368,8 +368,11 @@ static int ske_keypad_suspend(struct device *dev) if (device_may_wakeup(dev)) enable_irq_wake(irq); - else + else { + disable_irq(keypad->irq); ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0); + clk_disable(keypad->clk); + } return 0; } @@ -382,8 +385,11 @@ static int ske_keypad_resume(struct device *dev) if (device_may_wakeup(dev)) disable_irq_wake(irq); - else - ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); + else { + clk_enable(keypad->clk); + enable_irq(keypad->irq); + ske_keypad_chip_init(keypad); + } return 0; }