Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2249378pxy; Sun, 2 May 2021 16:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHY4/S9rjggn7THVaS6gTuI1JqvK3OiwKDF8Om3a9z2PpabpJElCvu05b2j8/tXGnGIVWX X-Received: by 2002:a17:906:fb0e:: with SMTP id lz14mr13871333ejb.424.1619998221431; Sun, 02 May 2021 16:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619998221; cv=none; d=google.com; s=arc-20160816; b=jiG5JYDOPSDmW5z78rBN2y9vxTb+Z0aSYFL3pwf7FHhV9AGcHCnmQYdyIanLQBqprN AMuUkQ+78Lexh6sOkXK6cqdxVI3g1Mz85RCIwLNgJ2DxE6cBrJ3d6a6Zrqeupi5P7sUk F2zURhIhWFeTQ8sUTGvIil/BCJCMo04dQpr/H5WyvUqQB1Xb5PXkCl8UMcY5zFB9dUHH Rex8hEJBkpA+NcJolaybNTaicHfjyREJLQtmea48c83fdQ8wd81X9+FI1RVOlR2df7aK MYiW8Ym6qrFxkufoLo2CmFwtlhT8hI9MkdO/dxxPZ9bD2lP4qCX8YwcOPxcuqBMICwIs qbXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wq+9AOkL4JGpDLI9TA6lF+OTMYlLbuFtkMj8UN2in4k=; b=k1EEOCQkN1iYUR+w3x+jaJOG8YMKZXnqiQAxcFKX73IO9YIY2a3valp+fpKAIOgIis x6qA07r/spRrtUqzxUG660ZHLSHlrBJ6YxDASvFO9fGnwDfm81pLFAvqWey0pLOvKhAz o6XufvWedYgQaeyidv+NUbXmBok5FF7+tkJvivlhPLWvYJ/udoPm1rkajB1YQCse3DEk lGgeOq2YQTIubuKj+R7Me3aEr2Qm0bxhwOCDJlrzHFUF7pylT6f6SCF042FM2+o/DKaZ j85yt9K3dsflKkSPT3bKlSTziQguzjFpIA+TOJz6C7w1UDo1LJGJfcrTBDMAtx4QIY5/ 2POg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si7780555edq.519.2021.05.02.16.29.58; Sun, 02 May 2021 16:30:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232492AbhEBX3z (ORCPT + 99 others); Sun, 2 May 2021 19:29:55 -0400 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163]:54956 "EHLO luna.linkmauve.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbhEBX3x (ORCPT ); Sun, 2 May 2021 19:29:53 -0400 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 7ECDAF405BD; Mon, 3 May 2021 01:28:55 +0200 (CEST) From: Emmanuel Gil Peyrot To: linux-input@vger.kernel.org Cc: Emmanuel Gil Peyrot , Ash Logan , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org Subject: [PATCH 0/4] RFC: HID: wiiu-drc: Add a driver for the Wii U gamepad Date: Mon, 3 May 2021 01:28:31 +0200 Message-Id: <20210502232836.26134-1-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver is for the DRC (wireless gamepad) when plugged to the DRH of the Wii U, a chip exposing it as a USB device. I tried to use this driver on master over usbip on my laptop, but usbip disconnects the device right after the driver created the /dev/input/event* files, so instead I have only tested this driver on the 4.19 branch of the linux-wiiu[1] downstream. Other than that, pretty much all of the HID parts of the gamepad work, it’s only missing microphone, camera and NFC input now but those are mostly standard (read require quirks) and pertain to other subsystems, so I felt like this can be upstreamed already. I’ve still put the RFC tag on this pull request because of two known problems in these patches (annotated with TODOs in the code): - The magnetometer is exposed using non-sensical ABS_* values, it seems most (all?) magnetometers are exposed in the iio subsystem instead, should I go the same way despite it clearly being part of the same HID device? - The battery number is currently based on a static int being incremented every time a new gamepad is “plugged in”, while I’d prefer to reuse the interface number for that. Thanks for your guidance. :) [1] https://gitlab.com/linux-wiiu/linux-wiiu Ash Logan (1): HID: wiiu-drc: Add a driver for this gamepad Emmanuel Gil Peyrot (3): HID: wiiu-drc: Implement touch reports HID: wiiu-drc: Add accelerometer, gyroscope and magnetometer readings HID: wiiu-drc: Add battery reporting drivers/hid/Kconfig | 7 + drivers/hid/Makefile | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 3 + drivers/hid/hid-wiiu-drc.c | 522 +++++++++++++++++++++++++++++++++++++ 5 files changed, 534 insertions(+) create mode 100644 drivers/hid/hid-wiiu-drc.c -- 2.31.1