From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] input: enable / disable methods with sysfs entry Date: Thu, 3 Dec 2009 11:08:34 +0000 Message-ID: <20091203110834.GF13165@rakim.wolfsonmicro.main> References: <1259837900-10803-1-git-send-email-samu.p.onkalo@nokia.com> <1259837900-10803-2-git-send-email-samu.p.onkalo@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from opensource.wolfsonmicro.com ([80.75.67.52]:56080 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755823AbZLCLI3 (ORCPT ); Thu, 3 Dec 2009 06:08:29 -0500 Content-Disposition: inline In-Reply-To: <1259837900-10803-2-git-send-email-samu.p.onkalo@nokia.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Samu Onkalo Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org 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.