From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v4 1/5] input: event-codes: reserve some space for REL_MISC events Date: Sat, 15 Apr 2017 10:55:02 -0700 Message-ID: <20170415175502.GC33447@dtor-ws> References: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:34200 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbdDORzF (ORCPT ); Sat, 15 Apr 2017 13:55:05 -0400 Received: by mail-pf0-f193.google.com with SMTP id g23so4395925pfj.1 for ; Sat, 15 Apr 2017 10:55:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Mauro Carvalho Chehab Cc: linux-input@vger.kernel.org, Benjamin Tissoires , Jiri Kosina , Stuart Yoder , Ingo Tuchscherer , "David S. Miller" , Greg Kroah-Hartman , Florian Fainelli , Ping Cheng , Hans Verkuil , Kamil Debski , Douglas Anderson On Tue, Apr 11, 2017 at 10:29:38AM -0300, Mauro Carvalho Chehab wrote: > The HID input layer has a tendency to map usages to REL_MISC > +1, +2, +3, etc... When it doesn't know how to map an > usage, the core layer maps it to the next one. We should wean HID off this habit. We should not be adding placeholder events without defined meaning. > > So, reserve some space for such events. > > Signed-off-by: Mauro Carvalho Chehab > --- > include/linux/mod_devicetable.h | 2 +- > include/uapi/linux/input-event-codes.h | 8 +++++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > index 8850fcaf50db..a3e8c572a046 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -286,7 +286,7 @@ struct pcmcia_device_id { > #define INPUT_DEVICE_ID_EV_MAX 0x1f > #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71 > #define INPUT_DEVICE_ID_KEY_MAX 0x2ff > -#define INPUT_DEVICE_ID_REL_MAX 0x0f > +#define INPUT_DEVICE_ID_REL_MAX 0x1f > #define INPUT_DEVICE_ID_ABS_MAX 0x3f > #define INPUT_DEVICE_ID_MSC_MAX 0x07 > #define INPUT_DEVICE_ID_LED_MAX 0x0f > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h > index f5a8d96e1e09..444956ba832c 100644 > --- a/include/uapi/linux/input-event-codes.h > +++ b/include/uapi/linux/input-event-codes.h > @@ -704,7 +704,13 @@ > #define REL_DIAL 0x07 > #define REL_WHEEL 0x08 > #define REL_MISC 0x09 > -#define REL_MAX 0x0f > +#define REL_MISC_1 0x0a > +#define REL_MISC_2 0x0b > +#define REL_MISC_3 0x0c > +#define REL_MISC_4 0x0d > +#define REL_MISC_5 0x0e > +#define REL_MISC_6 0x0f > +#define REL_MAX 0x1f > #define REL_CNT (REL_MAX+1) > > /* > -- > 2.9.3 > -- Dmitry