From patchwork Tue Apr 11 13:29:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9675295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D792600CB for ; Tue, 11 Apr 2017 13:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 012C628469 for ; Tue, 11 Apr 2017 13:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA22B28554; Tue, 11 Apr 2017 13:30:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F3DA28469 for ; Tue, 11 Apr 2017 13:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbdDKNaN (ORCPT ); Tue, 11 Apr 2017 09:30:13 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:59435 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752689AbdDKNaL (ORCPT ); Tue, 11 Apr 2017 09:30:11 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 23403A05F3; Tue, 11 Apr 2017 13:30:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ei1NuevDXqwB; Tue, 11 Apr 2017 13:30:34 +0000 (UTC) Received: from smtp.s-opensource.com (201.47.150.171.dynamic.adsl.gvt.net.br [201.47.150.171]) by osg.samsung.com (Postfix) with ESMTPSA id C086BA05ED; Tue, 11 Apr 2017 13:30:33 +0000 (UTC) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.87) (envelope-from ) id 1cxvrb-00025X-MA; Tue, 11 Apr 2017 10:29:43 -0300 From: Mauro Carvalho Chehab To: linux-input@vger.kernel.org, Dmitry Torokhov , Benjamin Tissoires , Jiri Kosina Cc: Mauro Carvalho Chehab , Stuart Yoder , Ingo Tuchscherer , "David S. Miller" , Greg Kroah-Hartman , Florian Fainelli , Ping Cheng , Hans Verkuil , Kamil Debski , Douglas Anderson Subject: [PATCH v4 1/5] input: event-codes: reserve some space for REL_MISC events Date: Tue, 11 Apr 2017 10:29:38 -0300 Message-Id: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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) /*