From patchwork Thu Aug 24 23:11:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roderick Colenbrander X-Patchwork-Id: 9921085 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 EB20360353 for ; Thu, 24 Aug 2017 23:12:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD1521FFC9 for ; Thu, 24 Aug 2017 23:12:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1AEE1FFDB; Thu, 24 Aug 2017 23:12:03 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 844E91FFDA for ; Thu, 24 Aug 2017 23:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754130AbdHXXMB (ORCPT ); Thu, 24 Aug 2017 19:12:01 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:37774 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754095AbdHXXMB (ORCPT ); Thu, 24 Aug 2017 19:12:01 -0400 Received: by mail-qk0-f178.google.com with SMTP id k126so4649789qkb.4 for ; Thu, 24 Aug 2017 16:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaikai-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0pLEA7agmZCa4IwF1kIiA3DfGThOYtn/hQisZtygerE=; b=he3X6uoqY6eNVuuvB5wFk8MVl490YRqvOOAgolBHSC1SCGji4gs1jhFl1gMB6wARIg Q7i6G6+7WDSgBqimS2NpFD9RhhjbKRVAQLOAxaFyji80td7NXFoOAyglszcWlDANiuVP a1O4X4uxm9wm3H6yvoHHBPgP+WpTLu+BAHtNkKOyjjQV5KmtEeUBH7s4yCWv9JCyP7Lx OdbFszWfYB7KnsxW0FWXdMmxbvkNe6ndshUTcBKIgCyQZDQSI/1hHS9qBWWsDrFMYFVk ccHO2B/7NnJIRfrxpbeInTmmS8WHXSNG890WFjmM/gFNixc0qGNOXhII1QLT15fXy4DC I7Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0pLEA7agmZCa4IwF1kIiA3DfGThOYtn/hQisZtygerE=; b=TyVPeMnKvB5TqWluZXI7kkHUtMVHvTp3rSQ+wkzmQCN2lqAtsZcNSncmxPm6a0m0uu fRKMvsJIr7rPRzGKXrm5JttSOjWf10QTknEyxeTdgtIy88iIoi4DUX1h0JiOuMvHtKpa 3c98F5DTxRBH5Djm8LU66S3J/waFQzaVVL8lLemL2UwK3ocT2/nNI2Xt4SdZ7qILCl1U Rdrfwuq0GcooHMXjSOKoGwzug4qtyGVor+tRaKzuMXdaVJsPmlzsLKYzED+2j8vJ2Wzc sqIqmd6uZlxtnBb0of/lzl5Rk1ggCm/zlixvEflQXEqHZqm4J3bust0fzlk1g8mXafXi qkKA== X-Gm-Message-State: AHYfb5ijow5ZOCvbtlAnDhq697n++suwdDYbenu4We0V22vzRUQWrAI/ Uh+pITgb7ZZzTZwW1PUh6A== X-Received: by 10.55.214.146 with SMTP id p18mr11516390qkl.252.1503616320357; Thu, 24 Aug 2017 16:12:00 -0700 (PDT) Received: from roderick.ad.gaikai.biz ([100.42.98.197]) by smtp.gmail.com with ESMTPSA id w16sm2955980qta.4.2017.08.24.16.11.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 16:11:59 -0700 (PDT) From: Roderick Colenbrander To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Benjamin Tissoires , Jiri Kosina , Bastien Nocera , Roderick Colenbrander Subject: [PATCH 1/4] Input: Add new property INPUT_PROP_JOYDEV_IGNORE Date: Thu, 24 Aug 2017 16:11:50 -0700 Message-Id: <20170824231153.8809-2-roderick@gaikai.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170824231153.8809-1-roderick@gaikai.com> References: <20170824231153.8809-1-roderick@gaikai.com> 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 From: Roderick Colenbrander This new property can be set on input devices to blacklist them from getting picked up by joydev. This is meant for devices, which pass joydev its heuristics, but for which there is no good generic way of updating the heuristics. Signed-off-by: Roderick Colenbrander --- Documentation/input/event-codes.rst | 9 +++++++++ include/uapi/linux/input-event-codes.h | 1 + 2 files changed, 10 insertions(+) diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst index a8c0873..ae8c546 100644 --- a/Documentation/input/event-codes.rst +++ b/Documentation/input/event-codes.rst @@ -356,6 +356,15 @@ can report through the rotational axes (absolute and/or relative rx, ry, rz). All other axes retain their meaning. A device must not mix regular directional axes and accelerometer axes on the same event node. +INPUT_PROP_JOYDEV_IGNORE +------------------------ + +The joydev interface uses heuristics to determine whether it should expose an +input device through joydev. Some devices pass its heuristics, but don't +make sense to expose. In some cases the generic heuristics can be updated, +but in other cases this is not easy. The INPUT_PROP_JOYDEV_IGNORE flag can +be set by drivers to explicit request blacklisting by joydev. + Guidelines ========== diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 1798910..f6aac0e 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -26,6 +26,7 @@ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ +#define INPUT_PROP_JOYDEV_IGNORE 0x07 /* hint to ignore device by joydev */ #define INPUT_PROP_MAX 0x1f #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)