Received: by 10.213.65.68 with SMTP id h4csp86978imn; Mon, 12 Mar 2018 07:33:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELuPzoDpgykj9IlqpZg9Ti9FBRPx7omUNV8nEUKgn4rLf78e1NLQtPm3dlKoaO9uZi8HZMvp X-Received: by 10.98.215.81 with SMTP id v17mr8308581pfl.110.1520865215832; Mon, 12 Mar 2018 07:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520865215; cv=none; d=google.com; s=arc-20160816; b=OAosto1OkzN1kCcaFfy1WM+cLwyi3EDl3mmDdne/igWF8nPLDBDs4R2qXvbbOwMxkT Zanzpc9AIgR9PskXDrLz7k+Jge7C47yy3u24bRJZDZ5aXxwVpUmRMLUeLg3R1FhOnAX2 T1YOuAuJZVbnXmrgyUlOG9NqK7/SmT4oaqsZBPg7IbFPI8e1psyxqj8qAhJx5ekYc5Uf 0wNbkMHV8/tXcBqUnPC5GHItoNIjpAySnmocrusWdMr6iHvx3OkVqC2m4KrF+I1Bboly /9nIQ1cNmU8GK4o97CW0SyK/sm5t7XC+/Vclo5qtpDhep2DIxmkmKV2B61LbLRxewtm9 bmLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=UZ4nZqsz85xqjtnppvjK+TTHeS/yhZGRNFrik6ArIHk=; b=IgWlqMTAR9qDS9pkh2oThbohEwKX1IdRFAx3HsS9CbplYOrkqsnhS+KAvs52fkJPrY CQ+NCXi1pnqZBP/eDH3p7ePSnAmybtocEd0rAiZamg4VYisaPNXjAYVIFKuLHzxcnLAe EgxZnv/447Anaxp/dNtbUEovW7B+s+N6S1ITviAU36idhWlFCa5I320JMKzD9pw4Ki0c 5TVPCZHYnIGQqBCg/5CrAFjhQcUDlYRGMtjkxoi8p8jJTWm8EHm9TjtqGnedl6LkLNxO f/jqvWXg6pkc8HK/0b0U9hhNeNo1Ff3WQj9kTUsOZOO7ZnzVlTmoUq0JHVeE445Q4Fzz psvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=edwgVziE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s126si1887271pgc.477.2018.03.12.07.33.20; Mon, 12 Mar 2018 07:33:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=edwgVziE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbeCLOat (ORCPT + 99 others); Mon, 12 Mar 2018 10:30:49 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:39133 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbeCLOao (ORCPT ); Mon, 12 Mar 2018 10:30:44 -0400 Received: by mail-it0-f48.google.com with SMTP id l187-v6so11688315ith.4; Mon, 12 Mar 2018 07:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UZ4nZqsz85xqjtnppvjK+TTHeS/yhZGRNFrik6ArIHk=; b=edwgVziECyvr/7+a+Lvkzk/i50MAUjgOef25yw1iO19u4LbTMHJu5+1H+Nm952aa6J iWdUUgXJKwOCV9g2hYIHq6J01my6VUVfOFSGm1jrSoiZiWZWEVGtpbT3SZIYquCrDY+S d6GEn46myAdHU8F94HWr1TRbDC8LbDtrRzPpIjCAuBvm7z4ImIOD99Y+C6V7DvIF/ujK 8bqqbZ+McPwDq+vQOMbF7Zc1SePydIMLoeQ/uiv53INpcXNdjma32L2n2EuZmQp2/O1u 89Pi43lKsrexSkqKA1hVJxEXnu0xgsF3vDgiVE5RZ79aoqn/3BHAmN9QqfCihDPgyS29 qrog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UZ4nZqsz85xqjtnppvjK+TTHeS/yhZGRNFrik6ArIHk=; b=nCBdxP8A+GPpaUFxEAtVXwKo8y79ym04Dz/dfS7lm+hU4tKluzO4ObwYTelntJp1wX Z3CjSojKj39FKPME5iHcRH6Hc8fwj859CZenZrhPHp/gUklJiaKf+jEnzEEHN2oxhCGn MQOBDmSutF8vbljiZuLE2otHNzJHBbBh+MyK71ZgZJR78rCDJCn5LbRBwdeCy+igcIuq wgrhPs2qto6JxAvzRDDxwCl2uQ13tWt/pU1vBv2QPcJ8X5fQUnrgCBhKiBiJcrAWeB70 mv5by5RsSMMKGmDwSswj0+lVJUUzeVVHFmWJLaBxXxVjXqXAipHbC6Df3f7jsqnyQImh QcpQ== X-Gm-Message-State: AElRT7HZhqLO7ZRplUqrGSGNkCpputjRTQCegrwwpW0l6Pc5+zDnzd0e NsebX6AwkwiCi8hF9dtNOvghHXrAt8xThpbp2ms= X-Received: by 10.36.128.200 with SMTP id g191mr9025023itd.41.1520865044007; Mon, 12 Mar 2018 07:30:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.225.144 with HTTP; Mon, 12 Mar 2018 07:30:43 -0700 (PDT) In-Reply-To: <20180311195842.5551-1-rodrigorivascosta@gmail.com> References: <20180311195842.5551-1-rodrigorivascosta@gmail.com> From: =?UTF-8?Q?Cl=C3=A9ment_VUCHENER?= Date: Mon, 12 Mar 2018 15:30:43 +0100 Message-ID: Subject: Re: [PATCH v5 0/4] new driver for Valve Steam Controller To: Rodrigo Rivas Costa Cc: Jiri Kosina , Benjamin Tissoires , "Pierre-Loup A. Griffais" , Cameron Gutman , lkml , linux-input Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-11 20:58 GMT+01:00 Rodrigo Rivas Costa : > This patchset implements a driver for Valve Steam Controller, based on a > reverse analysis by myself. > > Sorry, I've been out of town for a few weeks and couldn't keep up with th= is... > > @Pierre-Loup and @Cl=C3=A9ment, could you please have another look at thi= s and > check if it is worthy? Benjamin will not commit it without an express ACK= from > Valve. Of course he is right to be cautious, but I checked this driver wi= th > the Steam Client and all seems to go just fine. I think that there is a l= ot of > Linux out of the desktop that could use this driver and cannot use the St= eam > Client. Worst case scenario, this driver can now be blacklisted, but I ho= pe > that will not be needed. I tested the driver with my 4.15 fedora kernel (I only built the module not the whole kernel) and I got double inputs (your driver input device + steam uinput device) when testing Shovel Knight with Steam Big Picture. It seems to work fine when the inputs are the same, but after changing the controller configuration in Steam, the issue became apparent. And without Steam and your external tool, you get double inputs too. I tried RetroArch and it was unusable because of the keyboard inputs from the lizard mode (e.g. pressing B also presses Esc and quits RetroArch). Having to download and compile an external tool to make the driver work properly may be too difficult for the user. Your goal was to provide an alternative to user space drivers but now you actually depend on (a very simple) one. Also the button and axis codes do not match the gamepad API doc (https://www.kernel.org/doc/Documentation/input/gamepad.txt). > > For full reference, I'm adding a full changelog of this patchset. > > Changes in v5: > * Fix license SPDX to GPL-2.0+. > * Minor stylistic changes (BIT(3) instead 0x08 and so on). > > Changes in v4: > * Add command to check the wireless connection status on probe, without > waiting for a message (thanks to Cl=C3=A9ment Vuchener for the tip). > * Removed the error code on redundant connection/disconnection messages.= That > was harmless but polluted dmesg. > * Added buttons for touching the left-pad and right-pad. > * Fixed a misplaced #include from 2/4 to 1/4. > > Changes in v3: > * Use RCU to do the dynamic connec/disconnect of wireless devices. > * Remove entries in hid-quirks.c as they are no longer needed. This allo= ws > this module to be blacklisted without side effects. > * Do not bypass the virtual keyboard/mouse HID devices to avoid breaking > existing use cases (lizard mode). A user-space tool to do that is > linked. > * Fully separated axes for joystick and left-pad. As it happens. > * Add fuzz values for left/right pad axes, they are a little wiggly. > > Changes in v2: > * Remove references to USB. Now the interesting interfaces are selected = by > looking for the ones with feature reports. > * Feature reports buffers are allocated with hid_alloc_report_buf(). > * Feature report length is checked, to avoid overflows in case of > corrupt/malicius USB devices. > * Resolution added to the ABS axes. > * A lot of minor cleanups. > > Rodrigo Rivas Costa (4): > HID: add driver for Valve Steam Controller > HID: steam: add serial number information. > HID: steam: command to check wireless connection > HID: steam: add battery device. > > drivers/hid/Kconfig | 8 + > drivers/hid/Makefile | 1 + > drivers/hid/hid-ids.h | 4 + > drivers/hid/hid-steam.c | 794 ++++++++++++++++++++++++++++++++++++++++++= ++++++ > 4 files changed, 807 insertions(+) > create mode 100644 drivers/hid/hid-steam.c > > -- > 2.16.2 >