Received: by 10.213.65.16 with SMTP id m16csp213019imf; Mon, 12 Mar 2018 00:36:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELvhiEvnZd4vtd9xJKsTHnIJH/gIoyuTGnsZ1uuGoa5iB7dVvz8nEW9Orv7SFKr3gPmSlIKI X-Received: by 2002:a17:902:684:: with SMTP id 4-v6mr7347249plh.262.1520840195121; Mon, 12 Mar 2018 00:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520840195; cv=none; d=google.com; s=arc-20160816; b=VN1kb6IYoV9QI7UxA4NKBfaPKPQnGWM2xeqedQFq1Ig5wJb13MwghMskilds+tE22j jD2XxRscUSaznMElD7sZk0PhDCTGMVJKnj9EHYoqyb/Cv1OUfl+qATybr4jWMIt318eW +7zNnw3Naf7tLvyNIlsB/o1ZfddLBpi+F60A9dqKO22a7oOMADiHvCS5mUS27wCIY3n3 +u6CkrD2g1MmDjE9FDw3Yvim05Q2SPu45heayAnD65T3+76mgSpCKbCjpYGzbv1TdxC7 TEcI7eColwecxdnPTGssI3Uw+DIs4kuncuA+A03RIJVt+r6Xp/i8Z90sjxegSvlwEkQu QWIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=1ccof3H1XxQYxgFZXQ5kVdYfn3isKhNLA9IemPBxCiQ=; b=vyo5HRArQChDELAweqIu4zwz3uQXGQEEJwRtP8ZAnmqKjjNtI9KH1G65YoMPbi9jMt bMpVwxf1JIavBFR1vkRUzVgegEGAjmR/zGSCVm4IlyL3oiZMaJIxYoxkgJjhA802Kn0x 4drUBdcpPqK3r1AHdTS6CzxicH6rYVcwVVPpcZcSzHPUfMt5UU5hnk28MtczhPpiUauN cI3AO7ykTIVoicufPiHLijq4ePhv1I0OOgyPxpRvroJsdVduNu+X6KF4IFKShbmCV04g /apdTxjOkcJf0EHouxQqJn0xwsat7Dlt94RbMPcELOwI5mcCrES1JnMJl4KLVg3aMLBA FD7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QolfknYI; 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 p66si5306598pfd.342.2018.03.12.00.36.20; Mon, 12 Mar 2018 00:36: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=QolfknYI; 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 S1752202AbeCLHfZ (ORCPT + 99 others); Mon, 12 Mar 2018 03:35:25 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39190 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbeCLHfW (ORCPT ); Mon, 12 Mar 2018 03:35:22 -0400 Received: by mail-wr0-f195.google.com with SMTP id r66so6973041wrb.6; Mon, 12 Mar 2018 00:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1ccof3H1XxQYxgFZXQ5kVdYfn3isKhNLA9IemPBxCiQ=; b=QolfknYIlhIuty4OsFGOUHN8aWxhMDtVGGdz86C4Hf1R9s9KG+bF6fmvDGWvUfE24d yO18acFR8/vPFz+V/Y0/+OTTidQnE8oRVLtsX3XWMb2rWQxjF7MWTCqr+CHdTVsHRlc2 rZOfuWpe3sP09/SL/bcsb7FhyFGX68Mpqzkgkbq7ZoZ5HC1jwVBerr09V84TjGMY2H3A 9Z63t5UJCxDEw9L+D3fUoMmB3trM5naafP2h0BQ3HtY2q5wL5bt/Vxnw8vIjTNwLE6bW yOgp4LPmY/5AGZ5+9qFf5p07sI5no+teoFRPZyEFVPtXScLYlGkvSsWSNW6ZKRf5YavC uSjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1ccof3H1XxQYxgFZXQ5kVdYfn3isKhNLA9IemPBxCiQ=; b=jI+hqbQvK4c5leOTdNU6SaQjhhimROtFRViZP3GCTfoM/cfk7tk2Z3YQzziL+fQA/d SJkfBtNsyTi/Zm8hpa9U2QKZpUQFpl3qCadY2TNLV+iYk/+D9xAT8Iq30s+fzebJRHWh COGbUruyJqCX7E9L7FenQ7c0ugpqdczlh+lH7Myq9NUl5GnUnqqwOPN4rqpBG2OdXLfB Fh9F6WmE7udqGwNNLJXEvBypdAyL31o37saXY3Q9qgXfbhRVqintre5gUQ1OUrC6Htgo CFIBG9mtglc3+TtHHjckpacVMjlMpdc1R769s0Y/0rdm0RTPWlEctiOfBub5+I76CgGP Ufrw== X-Gm-Message-State: AElRT7GGG5T23R/1oQjmpXmLJzUiggIbCeYW214tz/VhPqB9UyzZFZwL 4aVwF/4GrXd5D9VK5GWiJ7A= X-Received: by 10.223.178.26 with SMTP id u26mr5748012wra.63.1520840121293; Mon, 12 Mar 2018 00:35:21 -0700 (PDT) Received: from casa ([2a01:c50e:5126:7a00:8c46:1fba:39a7:53e0]) by smtp.gmail.com with ESMTPSA id j6sm6029132wmg.14.2018.03.12.00.35.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Mar 2018 00:35:20 -0700 (PDT) Date: Mon, 12 Mar 2018 08:35:18 +0100 From: Rodrigo Rivas Costa To: "Pierre-Loup A. Griffais" Cc: Jiri Kosina , Benjamin Tissoires , Cameron Gutman , =?iso-8859-1?Q?Cl=E9ment?= VUCHENER , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH v5 0/4] new driver for Valve Steam Controller Message-ID: <20180312073518.GA21621@casa> References: <20180311195842.5551-1-rodrigorivascosta@gmail.com> <99cb195e-589c-b3fc-1237-e1c8f557c51e@valvesoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <99cb195e-589c-b3fc-1237-e1c8f557c51e@valvesoftware.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 11, 2018 at 04:12:41PM -0700, Pierre-Loup A. Griffais wrote: > > > On 03/11/2018 12:58 PM, Rodrigo Rivas Costa wrote: > > 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 this... > > > > @Pierre-Loup and @Cl?ment, could you please have another look at this 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 with > > the Steam Client and all seems to go just fine. I think that there is a lot of > > Linux out of the desktop that could use this driver and cannot use the Steam > > Client. Worst case scenario, this driver can now be blacklisted, but I hope > > that will not be needed. > > Hi Rodrigo, > > I think the approach you outlined earlier of only sending configuration > commands to the device when something is actively using the driver is sane. > I won't have the cycles to thoroughly check all the possible interactions > with the client in the near future, so in the interest of not blocking > development I'd say go for it. I'll try to get someone to take the patchset > for a spin soon. First of all, thank you very much for your attention. Note that this driver does not send any configuration command at all. It only sends commands get_serial (ae 15 01) and get_comm_status (b4), and those just on probe time. That should be quite safe IMO. Sending a configuration command, such as enable/disable_gyro on input->open() is probably not so safe, so I'm leaving that for an eventual future patch. Many games (and even X) enumerate the input devices by opening and closing them. That could cause trouble... Best regards. Rodrigo > > Thanks, > - Pierre-Loup > > > > > 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?ment 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 allows > > 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 > > >