From patchwork Sun May 13 12:43:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 8571 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 D826B23EAB for ; Sun, 13 May 2012 12:44:00 +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 9DCC0A187DD for ; Sun, 13 May 2012 12:44:00 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id un3so3901196obb.11 for ; Sun, 13 May 2012 05:44:00 -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=tgMfHum6iF/kk1gPSBrakZHn6+iw+hSkglpiK7rpkGg=; b=IhvStTSiCRWJ0o3sLVMzHBqM4Tabe8mAy4/gHZ3I2uB9qjGMycbABV3m5el7PNIFcF xUCaGnXoIq1W/Ly8cudrah/XVk6gNADgj+Ho0JCUGx0EaCxhhRiTfhykXfQOZkWRji4u vZSmcd2FU6VY+FDnjsEZbFHgG81gUjAOQolh62puinBJeXls8lZ8DH1s8BHQ2Rsb4x5R GUb8zYmuVXV9YOzNjox9UgwzRtcXr/BqrVAMAaWMCEPlu6dDzcTMGEKcVS7ybGZoLeB7 XldXX6Wa7HNyJv0yzTU58S2FNS+rQ0W5ApVIK4ei88x3WMKsrFhfNd1s0sX7F1i+hPYf tyzg== Received: by 10.50.160.225 with SMTP id xn1mr2328660igb.3.1336913040305; Sun, 13 May 2012 05:44:00 -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.73.147 with SMTP id q19csp286717ibj; Sun, 13 May 2012 05:43:59 -0700 (PDT) Received: by 10.213.22.6 with SMTP id l6mr759225ebb.73.1336913038800; Sun, 13 May 2012 05:43:58 -0700 (PDT) Received: from eu1sys200aog109.obsmtp.com (eu1sys200aog109.obsmtp.com. [207.126.144.127]) by mx.google.com with SMTP id w9si2978884eem.66.2012.05.13.05.43.55 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 May 2012 05:43:58 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.127 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.127; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.127 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-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKT6+siuDyrtuweNflPZJtfk++/U5tI+2o@postini.com; Sun, 13 May 2012 12:43:58 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 2F910A5; Sun, 13 May 2012 12:35:30 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 494F8BE3; Sun, 13 May 2012 12:43:51 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 475AAA807B; Sun, 13 May 2012 14:43:45 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sun, 13 May 2012 14:43:50 +0200 From: Linus Walleij To: Dmitry Torokhov Cc: , Naveen Kumar Gaddipati , Linus Walleij Subject: [PATCH 2/7] input/nomadik-ske: suspend and resume support Date: Sun, 13 May 2012 14:43:47 +0200 Message-ID: <1336913027-10047-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: ALoCoQkmgwGcwAVGykNw7FqaFaC3q1nww0NjTZ0NV4pZiwk0bQvcMdp7pgdyMlP74eevDfjVzh7n 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 61c1537..0df47e5 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; }