From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joonyoung Shim Subject: Re: [PATCH] input: enable / disable methods with sysfs entry Date: Thu, 03 Dec 2009 20:42:38 +0900 Message-ID: <4B17A42E.3000805@samsung.com> References: <1259837900-10803-1-git-send-email-samu.p.onkalo@nokia.com> <1259837900-10803-2-git-send-email-samu.p.onkalo@nokia.com> <20091203110834.GF13165@rakim.wolfsonmicro.main> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7BIT Return-path: Received: from mailout4.samsung.com ([203.254.224.34]:41857 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbZLCLmh (ORCPT ); Thu, 3 Dec 2009 06:42:37 -0500 Received: from epmmp1 (mailout4.samsung.com [203.254.224.34]) by mailout1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0KU2006UTR71MQ@mailout1.samsung.com> for linux-input@vger.kernel.org; Thu, 03 Dec 2009 20:42:38 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0KU200KNZR7131@mmp1.samsung.com> for linux-input@vger.kernel.org; Thu, 03 Dec 2009 20:42:37 +0900 (KST) In-reply-to: <20091203110834.GF13165@rakim.wolfsonmicro.main> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Mark Brown Cc: Samu Onkalo , dmitry.torokhov@gmail.com, linux-input@vger.kernel.org On 12/3/2009 8:08 PM, Mark Brown wrote: > On Thu, Dec 03, 2009 at 12:58:19PM +0200, Samu Onkalo wrote: >> Add optional enable and disable methods to input system. >> Add sysfs entry for enabling and disabling input device. > >> When registering a device to input system, device can provide >> optional enable and disable methods. State is set to enabled by default. >> Opening / closing the input device doesn't change the state. >> If the callback functions are not provided, sysfs entry returns >> ENOSYS error code. > > I'm wondering if it might be nice to provide a default implementation > which causes the input core to ignore the events generated by the device > if the driver doesn't support being enabled or disabled? Obviously this > wouldn't be of any benefit in preventing resume or providing power > saving but it would give userspace the same effect which might be useful > to it for UI purposes. I think a default implementation of the input core for this is useful ex. at gpio-keys driver.