From patchwork Fri Aug 18 02:01:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roderick Colenbrander X-Patchwork-Id: 9907451 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 71D9D600CC for ; Fri, 18 Aug 2017 02:02:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 626F328C51 for ; Fri, 18 Aug 2017 02:02:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5713228C53; Fri, 18 Aug 2017 02:02: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.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 F157928C51 for ; Fri, 18 Aug 2017 02:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900AbdHRCCN (ORCPT ); Thu, 17 Aug 2017 22:02:13 -0400 Received: from mail-qt0-f175.google.com ([209.85.216.175]:36104 "EHLO mail-qt0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753857AbdHRCCM (ORCPT ); Thu, 17 Aug 2017 22:02:12 -0400 Received: by mail-qt0-f175.google.com with SMTP id v29so47259626qtv.3 for ; Thu, 17 Aug 2017 19:02:12 -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=NsUW8ivVnLm4XJOf5+HdQSl9rMaL16DhjcU8mn1+Wrw=; b=EWzvV1PgQFz5vCuxI8tMbuiLUrugx4SfvDgmBubAGsR0JVRVglxaRM66I0qdQicuV7 2pfVLQdBv7i+MQuL6xOGr6IvVMTJmlAgRgIqePDxZ6oPAarQbpQfNGmlf15wWQb+0NPu r2/D52H1X2iHdDfFdQpXeJJiIa0gTk4oVt7Dn7YArZBYy1ZFtq0EdhJ9X9K3BvHRMrH0 hrs3yeKtRemoVfFy6WbsCC8ras/RHnWZuAhDAwmcwQC/Rf1wa8QhtmqUlThtB0mPVtO7 36BXvGPdL/DIMB0mUV+UVJSeB0Ykt2br2jVe6UsXR/Pitf+Uy4ZLBjB8UoNlO2DVCn3l uEiQ== 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=NsUW8ivVnLm4XJOf5+HdQSl9rMaL16DhjcU8mn1+Wrw=; b=OXSfvmRkCOHWqA+uZsy7cP1Pit/Em0Ol+TSLOLeqAvlDcgw6ZHP3Z3TDk6Lr2vNfAC Ug/C1A/yrDAMSk5wBTFL+tTpTYgX/LOoXveOi4qVkI5VRm8RnOJTI9MMqkb4GLUkJ+4G JB9h916t7ONJOTJI0Bp45TRhcZuCUXggGm49w1PvPeDl/uO1WFGpv0meBAi+zjl3kOOD c1wG3nsncZN1RLEN+4QYnfCyIE+qjlnW/YNRrUIAedgVw/fWaFjV+KQRpiTVh8mGGVjF uTyjckAtoPMhOCUpDL0rJKnN1RWBGtNxM8c1KAg/G08z+4sFDeGgzGcIi16fWv1qLDcc ZHkg== X-Gm-Message-State: AHYfb5h21UvaiEhzHm8xgSkn/HOBffWp7c6n2NztaEvPR6SMpuhFFj1p WXd87twtNOlU4KTNONqKHg== X-Received: by 10.200.51.57 with SMTP id t54mr10097641qta.12.1503021731755; Thu, 17 Aug 2017 19:02:11 -0700 (PDT) Received: from roderick.ad.gaikai.biz ([100.42.98.197]) by smtp.gmail.com with ESMTPSA id a4sm3036223qkd.20.2017.08.17.19.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Aug 2017 19:02:11 -0700 (PDT) From: Roderick Colenbrander To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Benjamin Tissoires , Jiri Kosina , Roderick Colenbrander Subject: [PATCH 3/3] Input: joydev - ignore accelerometer devices Date: Thu, 17 Aug 2017 19:01:56 -0700 Message-Id: <20170818020156.23390-4-roderick@gaikai.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170818020156.23390-1-roderick@gaikai.com> References: <20170818020156.23390-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 --- drivers/input/joydev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 29d677c..9b70fe0 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -819,6 +819,11 @@ static bool joydev_match(struct input_handler *handler, struct input_dev *dev) if (joydev_dev_is_absolute_mouse(dev)) return false; + /* Avoid accelerometers on composite devices. */ + if (test_bit(INPUT_PROP_ACCELEROMETER, dev->propbit) && + test_bit(INPUT_PROP_COMPOSITE, dev->propbit)) + return false; + return true; }