Received: by 10.213.65.16 with SMTP id m16csp25529imf; Sun, 11 Mar 2018 13:02:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELvA4ehtot1o7LM6k/zh8tngGM8SXvfepQAw0qCE1RnD8Qam10pC6hMCfr9vUnstAxe+V4C2 X-Received: by 2002:a17:902:a5c2:: with SMTP id t2-v6mr5813254plq.244.1520798553822; Sun, 11 Mar 2018 13:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520798553; cv=none; d=google.com; s=arc-20160816; b=lJEjiGxBH+NCNKlYT4y9Qvk7ITkezY9ecksW2enMMYCern+WQD7yFqqz3T6DbKtPHl 3HXq2wgIT/9LXMnsIfZr+3B36BpMOlcFtx7pIacimcXUQIgtDNeykqawm1GimPOqjS9X Bavj8Kt3hNq6dI1nsBa1KiR0iSupv/r/5XYtSqyGseaSIhqN1ryknJm5WJsH5uITqfq0 uZBQk+c0tSrb8zXeQf7OzlWTqwUDSVYA56UKLx9ucKYSl5gzhz2wpEqwYCHkGRpXbY1m AbyNkzoUIkNJrSd3CWsu/UsqA/FAEXXobI7uGiL3bTTcLIBxOhiELLUEAKJU7rwXH4q6 wvSQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=0tKpDvVmyCQ3BIeQwTsiX8qn+mZxrNfGJr7P6F7DN+M=; b=MR0Spzzsk9H6+xEJPtKXaoHpgKHNZYYTgj/EbdRixGWxiUwKU7QXyfzhkHvlrMzQ0P /f3GmbxXNvT6J1GAwlUqnp8tPZzdLbDkch0k+6OrLHItqanuTmOwOEA4kAxz3MSc2C3P k4gZYVxiaHtpFnbTMgmtiFyq9IUkvDQUrTClv+Lefr4a3619lZuSH1wJXMhv2Hn4oaR6 iaeY7lM5F/mMoxzbPaYqlBudHWqZlTzqpkI4Vx5R1tH03kjsjbGy9xYQNe2IaIoIBfMt +nYQ5qlnVz/BGxUmNNfizMvquuiufaYeZBqi7SKBtA5zWUPajTIl9XPK9wZlzYGwhree PkcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ua3HUagf; 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 f4-v6si4648402plr.267.2018.03.11.13.02.19; Sun, 11 Mar 2018 13:02:33 -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=Ua3HUagf; 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 S932295AbeCKT64 (ORCPT + 99 others); Sun, 11 Mar 2018 15:58:56 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:41440 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbeCKT6x (ORCPT ); Sun, 11 Mar 2018 15:58:53 -0400 Received: by mail-wr0-f171.google.com with SMTP id f14so13634549wre.8; Sun, 11 Mar 2018 12:58:53 -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:mime-version :content-transfer-encoding; bh=0tKpDvVmyCQ3BIeQwTsiX8qn+mZxrNfGJr7P6F7DN+M=; b=Ua3HUagfQV+YcRO5LIms6jEPM/rkVZnnc6Xdm1zRy86OrQgPTtmGYMuZXRvoLnxVRP wPUJnDr/y+wtl/m1jZ7UWDY/u/6+OOwcVdOVxnLcqaKGKKEwz3q2ncPK8N5keFS8t/WX rsCNbNMRCD+6OAgl6+Y1OLYDeIsv15b/9fxea6uf/8FTA2vqca6Eg1EjeqMWX3KXa7jx 0RRUa8EhhRnPqrYLfD1sDOP94O5s43XKKrmSDeft0fhrX04P1dyyreh69gF3KMrSHVsC NCjvcsVXSS0X2MgvxOXkl59vOVqZVtSnK1Ln5wY1RiNlXuamkB9l1h03L+67lvSgYaRW IrpA== 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:mime-version :content-transfer-encoding; bh=0tKpDvVmyCQ3BIeQwTsiX8qn+mZxrNfGJr7P6F7DN+M=; b=CJje7rLms2dTWwJyBT01ZP5WnJYpDbDk609iY16haAxCAZ/Ts0RDxrZes1T04hPFpm 6cVjdekOwlu9lqG/vrtS7GB+b58K3u78xzwr2H/nlgCgdwNH8BTj6YzTiQu7LNehrsQa NUn60PYXuGXX6/k+9HzJF96TfGHG4dQG5x4da7Mh7aEQcvoLVSlwnllVxrpqXmph37+b N/yR6IJi+j6hmqz3hVqrpkEG5pUKFAuiKr+/LiA0c4f8Iyc2lH+WH4qsoDwZyXsSFWPw B70zSPtELM03yg5OgeJG5Zc47mohuFJ14kV6V7VwALclgR5IkVlfAz+MMKPm90jlD136 KUlQ== X-Gm-Message-State: AElRT7HwW2NNaHJZDN/xAKpT6O6My4zhVfkchBI8xnEJvmO2TmTG3c79 0kSenCQCX7Fjc9+j8ZqlQ6I= X-Received: by 10.223.142.173 with SMTP id q42mr4725610wrb.254.1520798332656; Sun, 11 Mar 2018 12:58:52 -0700 (PDT) Received: from localhost.localdomain ([2a01:c50e:5126:7a00:b895:42e2:2236:5d86]) by smtp.gmail.com with ESMTPSA id 8sm4900473wmf.13.2018.03.11.12.58.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 12:58:51 -0700 (PDT) From: Rodrigo Rivas Costa To: Jiri Kosina , Benjamin Tissoires , "Pierre-Loup A. Griffais" , Cameron Gutman , =?UTF-8?q?Cl=C3=A9ment=20VUCHENER?= , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Cc: Rodrigo Rivas Costa Subject: [PATCH v5 0/4] new driver for Valve Steam Controller Date: Sun, 11 Mar 2018 20:58:38 +0100 Message-Id: <20180311195842.5551-1-rodrigorivascosta@gmail.com> X-Mailer: git-send-email 2.16.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 -- 2.16.2