From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH] input: enable / disable methods with sysfs entry Date: Thu, 3 Dec 2009 19:22:18 +0200 Message-ID: <20091203172218.GC5626@gw.healthdatacare.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> <4B17A42E.3000805@samsung.com> <874oo8w0co.fsf@tac.ki.iif.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-bw0-f227.google.com ([209.85.218.227]:33854 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbZLCRWQ (ORCPT ); Thu, 3 Dec 2009 12:22:16 -0500 Received: by bwz27 with SMTP id 27so1310474bwz.21 for ; Thu, 03 Dec 2009 09:22:22 -0800 (PST) Content-Disposition: inline In-Reply-To: <874oo8w0co.fsf@tac.ki.iif.hu> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Ferenc Wagner Cc: Samu Onkalo , Mark Brown , Joonyoung Shim , dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, Mika Westerberg On Thu, Dec 03, 2009 at 04:20:23PM +0100, Ferenc Wagner wrote: > Joonyoung Shim writes: > > > 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. > > Mika Westerberg is proposing an actual device specific implementation > for gpio-keys right now. The implementation details are not decided > yet, but unifying the interface would be preferable, so Cc-ing him. Unifying these would be nice. However, in the gpio-keys patch the idea is that we could disable separate GPIO lines from the device, not the whole device. Maybe something like generic sysfs entry for the input device to disable the whole device /and/ also possibility to disable single events or something like that? > Do you work at different departments? :) Well we work at different locations :) Thanks, MW