From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= Subject: Re: [PATCH 8/9] Input: Block suspend while event queue is not empty. Date: Fri, 23 Apr 2010 22:02:50 -0700 Message-ID: References: <1271984938-13920-1-git-send-email-arve@android.com> <1271984938-13920-9-git-send-email-arve@android.com> <20100423135625.1e12d005.randy.dunlap@oracle.com> <201004231408.15885.dmitry.torokhov@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <201004231408.15885.dmitry.torokhov@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Dmitry Torokhov Cc: Randy Dunlap , =?ISO-8859-1?Q?M=E1rton_N=E9meth?= , Thadeu Lima de Souza Cascardo , linux-input@vger.kernel.org, Sven Neumann , linux-kernel@vger.kernel.org, Henrik Rydberg , Jiri Kosina , linux-pm@lists.linux-foundation.org, Tero Saarni , Matthew Garrett List-Id: linux-pm@vger.kernel.org On Fri, Apr 23, 2010 at 2:08 PM, Dmitry Torokhov wrote: > On Friday 23 April 2010 01:56:25 pm Randy Dunlap wrote: >> On Thu, 22 Apr 2010 18:08:57 -0700 Arve Hj=F8nnev=E5g wrote: >> > Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a suspend_blocker that will >> > block suspend while the event queue is not empty. This allows userspace >> > code to process input events while the device appears to be asleep. >> >> All new ioctls need to be added to Documentation/ioctl/ioctl-number.txt, >> please. > > I do not see the reason for it to be in the kernel still. Have a process > that listens to all input devices (or subset of them), once events stop > coming initiate suspend. > I think the document added by the first patch explains this. The solution you propose above will ignore a wakeup key pressed right after user space decides to initiate suspend. -- = Arve Hj=F8nnev=E5g