From patchwork Fri Jun 9 20:35:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roderick Colenbrander X-Patchwork-Id: 9779281 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 4EE9760352 for ; Fri, 9 Jun 2017 20:35:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41F362864F for ; Fri, 9 Jun 2017 20:35:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36E7B28704; Fri, 9 Jun 2017 20:35:55 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 BDDEC2864F for ; Fri, 9 Jun 2017 20:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751560AbdFIUfx (ORCPT ); Fri, 9 Jun 2017 16:35:53 -0400 Received: from mail-qt0-f177.google.com ([209.85.216.177]:35261 "EHLO mail-qt0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbdFIUfx (ORCPT ); Fri, 9 Jun 2017 16:35:53 -0400 Received: by mail-qt0-f177.google.com with SMTP id w1so88597103qtg.2 for ; Fri, 09 Jun 2017 13:35:52 -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=IVDbxWk/gP7W/X8PxmoDvnHLYGneKVBHLmXtGUo/FKI=; b=DmDzBL5tYuIILwoBuAg5f55MmEcRVioF1Ton5W5t0iNtdJShjWVTqc4niRvywHZNhC oTegOPBz4Jvb/5vEYBbtZHehE6SWq1TZ1nptWcC0ApH9CSDzD5Cra1fhSNMksv3LUFs5 KmXVe8vVuB4EICjSpHcKeDzc+5G6ysXSXYibmd1miJHP0eMETXvMxXR63WNbhxPbCAq1 LXIvIZBqr5xoC1BQ9uZONYp12CTTySAIXfDptXc4OYCEecBeg+7t53pb4ZgjsXrYHirS TJeHHkZc7spAAMRvsD72nhfUzkjJf7FUo//HK2pSOKsPN0fPRWG1rhmE1Hh9GMz5mXBG 4FZg== 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=IVDbxWk/gP7W/X8PxmoDvnHLYGneKVBHLmXtGUo/FKI=; b=mbsSB/r+9iGkrOJd50yEGE0Xu1i2x4r6VYiD63KZh/Dgs8MntXY+JnEcJ8j6wJ7lB2 BhiBMiCdVhJWQeSEhS+U5sx1acjjQ/LykG32wJn/mXE8UftJrp8wKN3gY+zME+Cd2hLy ttlk1dKTiBvPWe1JewZ/kXmSCNYBXqLTA+rN6N5HivwLv1Ej88OTH8TBwHTaYjHS/oao kpnZcPuRzerdHCyPk5XvRFpFe2XlMhUtzPxDFO5lzuvCUssdXj67DacW9QmGI3Tr6ILR w2rHtmiLg5D4/NQSJF51wq6FKHBlqTx9Qrr3K/9K1Vbf0RhJGth9tPCL3KvhIJIGHpIg h5NA== X-Gm-Message-State: AKS2vOxTWmiJ24eC66HafUMqUtMtjcFOMNtqpT7B5ONyyIut8PIdBEbu SgmshA27p654QlVLGQ2H+A== X-Received: by 10.55.97.205 with SMTP id v196mr558464qkb.107.1497040551958; Fri, 09 Jun 2017 13:35:51 -0700 (PDT) Received: from roderick.ad.gaikai.biz ([100.42.98.197]) by smtp.gmail.com with ESMTPSA id 34sm1462740qtn.45.2017.06.09.13.35.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 13:35:51 -0700 (PDT) From: Roderick Colenbrander To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Benjamin Tissoires , Roderick Colenbrander Subject: [PATCH] Input: joydev - ignore accelerometer devices Date: Fri, 9 Jun 2017 13:35:47 -0700 Message-Id: <20170609203547.17691-2-roderick@gaikai.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170609203547.17691-1-roderick@gaikai.com> References: <20170609203547.17691-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 Gamepads like DualShock 3 / 4 as of 4.12 started reporting motion sensors on a separate evdev node. Joydev is picking these devices up as well, but they don't make sense for the joydev interface. Signed-off-by: Roderick Colenbrander Acked-By: Benjamin Tissoires --- drivers/input/joydev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 29d677c..a5ceaaf 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -819,6 +819,10 @@ static bool joydev_match(struct input_handler *handler, struct input_dev *dev) if (joydev_dev_is_absolute_mouse(dev)) return false; + /* Avoid accelerometers */ + if (test_bit(INPUT_PROP_ACCELEROMETER, dev->propbit)) + return false; + return true; }