From patchwork Thu Aug 16 02:44:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10566925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12EC7921 for ; Thu, 16 Aug 2018 02:45:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06C929CD6 for ; Thu, 16 Aug 2018 02:45:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D18422ACB8; Thu, 16 Aug 2018 02:45:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 70B6F29CD6 for ; Thu, 16 Aug 2018 02:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbeHPFkS (ORCPT ); Thu, 16 Aug 2018 01:40:18 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41676 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbeHPFkS (ORCPT ); Thu, 16 Aug 2018 01:40:18 -0400 Received: by mail-pf1-f195.google.com with SMTP id y10-v6so1315553pfn.8; Wed, 15 Aug 2018 19:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=F2lUfS2qMObMXB1Iowh/bq7TdSASYc3dbif4z8CD7hU=; b=P2ndkyj3vvGWwRNSixRpkXslvL8MMGPtqsvra5P06SZKIiE+FzGnhesd6ejsprncPn O2rY4CGxWlrFfzXxzyR15Y9fVMznu41PqTGZFokHvwpXfTVD8ghn96ZgzWvLPPnX1vVl e+4WYj8kxjU+prsBlmsOkR5gwjIHtah+AFGyMD/c7E9qpXD9AzMtfyvqlE2c2QuDYk5Z RMqLxhFnwqsXfMj8quCyENLQ25Kv2PpFrQ0tGvnamPasuX03TSBsnam7YV8LDYrX3hlx pRS6H+5lclKT0SfS9uIerQsMUSLjsEJKJqgLAUi8NtgY+aFeEQOJFkg8EC92n45pBcUL bSJw== 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; bh=F2lUfS2qMObMXB1Iowh/bq7TdSASYc3dbif4z8CD7hU=; b=Hn907JE0Oz2FGh7wwWIKdqED492jhOc9DWItgh3elHY7Xuf34FmKl6sObKLSpJ3q7S ez4wVBe97baS7Jp1KFKAk5gOFxgLS0gb0Jt20GyIeD5Q/3GfjWN5R1OBqkM4mknCSMuC iK9aYq0ax7OQJhaBPJijFFdLGIUl/qkmlc9Ch44ZpBztqKuWVTUQ5yiCj8GedG41zWLV sz+MU7BLyal+laRsxXBKVNkOcWwddIjctkbsJXEq3WW0GMpvPygXNuHpZJXEKdjv587z uVO+p1kULhcB9KZ1F7clxVqy2KQKniGT1ZlD3Mw4nWymVzsEgEfo/1hM/0cEM6tMqGXM m1mA== X-Gm-Message-State: AOUpUlGEfi1vbbAn2OHWxVJq2sn/sdijTGcWKK7kc7+bXwhRQo4+Xavd 1Ojw2xEAv/rr25WMmB32vaE= X-Google-Smtp-Source: AA+uWPwv7QKnMJ/Xn5y3z/LPP+xW+4UAiLsQXcd+yx6gR29blHHLp9cpoKNvC7M0gc+Cz7erOfelSQ== X-Received: by 2002:a63:d80f:: with SMTP id b15-v6mr27628317pgh.347.1534387507257; Wed, 15 Aug 2018 19:45:07 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id t15-v6sm37823323pfa.158.2018.08.15.19.45.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Aug 2018 19:45:06 -0700 (PDT) From: Andrey Smirnov To: Jiri Kosina Cc: Andrey Smirnov , Dmitry Torokhov , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Pierre-Loup A . Griffais" , Juha Kuikka Subject: [PATCH v2 0/2] Rumble support for Xbox One S controller Date: Wed, 15 Aug 2018 19:44:08 -0700 Message-Id: <20180816024410.29218-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.17.1 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 Everyone: This is v2 of the patches adding support for rumble for Xbox One S controller connected over Bluetooth. Hopefully all of the changes are pretty straightforward and self-explanatory. Feedback is wellcome! Changes since [v1]: - code converting the driver to use struct ms_data is split into a separate patch - CONFIG_MICROSOFT_FF removed - explicit PID comparison replaced with MS_QUIRK_FF - ms_init_ff() converted to be a no-op for devices that don't have FF - all FF cleanup actions moved into ms_remove_ff() - struct xb1s_ff_report declared to be packed, magic 4 replaced with MAGNITUDE_NUM, output_report_dmabuf converted to be void * to avoid the need to typecast it. Thanks, Andrey Smirnov [v1] lkml.kernel.org/r/20180810001714.14659-1-andrew.smirnov@gmail.com Andrey Smirnov (2): hid: microsoft: Convert private data to be a proper struct hid: microsoft: Add rumble support for Xbox One S controller drivers/hid/hid-ids.h | 1 + drivers/hid/hid-microsoft.c | 142 ++++++++++++++++++++++++++++++++++-- 2 files changed, 138 insertions(+), 5 deletions(-)