From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755788Ab2IFOLy (ORCPT ); Thu, 6 Sep 2012 10:11:54 -0400 Received: from na3sys009aog102.obsmtp.com ([74.125.149.69]:50110 "EHLO na3sys009aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755148Ab2IFOLw (ORCPT ); Thu, 6 Sep 2012 10:11:52 -0400 Message-ID: <5048AF1F.8010607@ti.com> Date: Thu, 06 Sep 2012 19:41:43 +0530 From: Shubhrajyoti User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: NeilBrown CC: "Shilimkar, Santosh" , "Rafael J. Wysocki" , Tarun Kanti DebBarma , Kevin Hilman , Tony Lindgren , Benoit , Grant Likely , Felipe Balbi , linux-omap@vger.kernel.org, lkml , Jon Hunter Subject: Re: [PATCH] OMAP GPIO - don't wake from suspend unless requested. References: <20120825214459.7333a376@notabene.brown> <20120827085312.75957354@notabene.brown> <20120906130510.32b0b877@notabene.brown> <20120906170245.10e97bdd@notabene.brown> In-Reply-To: <20120906170245.10e97bdd@notabene.brown> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 06 September 2012 12:32 PM, NeilBrown wrote: > From: NeilBrown > Subject: [PATCH] OMAP GPIO - don't wake from suspend unless requested. > > Current kernel will wake from suspend on an event on any active > GPIO even if enable_irq_wake() wasn't called. > > There are two reasons that the hardware wake-enable bit should be set: > > 1/ while non-suspended the CPU might go into a deep sleep (off_mode) > in which the wake-enable bit is needed for an interrupt to be > recognised. > 2/ while suspended the GPIO interrupt should wake from suspend if and > only if irq_wake as been enabled. > > The code currently doesn't keep these two reasons separate so they get > confused and sometimes the wakeup flags is set incorrectly. > > This patch reverts: > commit 9c4ed9e6c01e7a8bd9079da8267e1f03cb4761fc > gpio/omap: remove suspend/resume callbacks > and > commit 0aa2727399c0b78225021413022c164cb99fbc5e > gpio/omap: remove suspend_wakeup field from struct gpio_bank > > and makes some minor changes so that we have separate flags for "GPIO > should wake from deep idle" and "GPIO should wake from suspend". > > With this patch, the GPIO from my touch screen doesn't wake my device > any more, which is what I want. Just gave it a try fixes a similar issue on my omap4 board as well. > > Cc: Kevin Hilman > Cc: Tony Lindgren > Cc: Santosh Shilimkar > Cc: Cousson Benoit > Cc: Grant Likely > Cc: Tarun Kanti DebBarma > Cc: Felipe Balbi > Cc: Govindraj.R > > Signed-off-by: NeilBrown