From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hutterer Subject: Re: [PATCH RFC 3/4] input: add a EV_SW event for ratchet switch Date: Mon, 27 Mar 2017 11:53:57 +1000 Message-ID: <20170327015357.GE21915@jelly> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from leo.clearchain.com ([199.73.29.74]:41474 "EHLO mail.clearchain.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbdC0Byg (ORCPT ); Sun, 26 Mar 2017 21:54:36 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Mauro Carvalho Chehab Cc: linux-input@vger.kernel.org, Dmitry Torokhov , Benjamin Tissoires , Greg Kroah-Hartman , Martin Schwidefsky , Mauro Carvalho Chehab , Ingo Tuchscherer , Stuart Yoder , Hans Verkuil , Douglas Anderson , Ping Cheng , Kamil Debski On Sat, Mar 25, 2017 at 07:49:41PM -0300, Mauro Carvalho Chehab wrote: > Some mouses have a switch on their wheel, allowing to switch > between ratchet or free wheel mode. Add support for it. I understand the want to support it because it's there but what do you expect this to be used for? tbh, I wouldn't know what to do with this information, short of displaying some OSD to inform the user. Which is rather superfluous since the physical change will feel obvious anyway. A Documentation/input/event-codes.txt hunk would be welcomed here too btw. Cheers, Peter > > Signed-off-by: Mauro Carvalho Chehab > --- > include/linux/mod_devicetable.h | 2 +- > include/uapi/linux/input-event-codes.h | 4 +++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > index 8a57f0b1242d..73534c591b40 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -292,7 +292,7 @@ struct pcmcia_device_id { > #define INPUT_DEVICE_ID_LED_MAX 0x0f > #define INPUT_DEVICE_ID_SND_MAX 0x07 > #define INPUT_DEVICE_ID_FF_MAX 0x7f > -#define INPUT_DEVICE_ID_SW_MAX 0x0f > +#define INPUT_DEVICE_ID_SW_MAX 0x1f > > #define INPUT_DEVICE_ID_MATCH_BUS 1 > #define INPUT_DEVICE_ID_MATCH_VENDOR 2 > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h > index 23b2d377af59..a3eafd0527f1 100644 > --- a/include/uapi/linux/input-event-codes.h > +++ b/include/uapi/linux/input-event-codes.h > @@ -782,7 +782,9 @@ > #define SW_LINEIN_INSERT 0x0d /* set = inserted */ > #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ > #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ > -#define SW_MAX 0x0f > +#define SW_RATCHET 0x10 /* set = ratchet mode, > + unset: free wheel */ > +#define SW_MAX 0x1f > #define SW_CNT (SW_MAX+1) > > /* > -- > 2.9.3 > >