Received: by 10.223.185.116 with SMTP id b49csp1452wrg; Tue, 20 Feb 2018 14:38:19 -0800 (PST) X-Google-Smtp-Source: AH8x227kto6Xyh7QwuaFgzRo5BgOCQl/+tItOlAlQ2hb99SCzwLZogC4GSVasa2OIjITDcPixORQ X-Received: by 2002:a17:902:6e01:: with SMTP id u1-v6mr1075647plk.12.1519166298966; Tue, 20 Feb 2018 14:38:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519166298; cv=none; d=google.com; s=arc-20160816; b=tJWmH4IpyomJB9lS5WVrOd78DR4XDSnwTNwTF9w5Plk3oLCUY6aN/eLJa+v5ACFg2Q D4LW7I84tTd0oRf73p/FLD6IdNYYhPL8G+477JozaSC7LlqFl/LSAB6eIx3jB1AEC/2l hRF1HbLOgptft4Egl27WgNgaArW0B06IVuwKTbpFrDa4IvkfW2w/XXz/uuMaGUcT1/vX f41TbKFHQEoB0Xz6EOG85Z6jycKryKnOwINjzHdekSmO1Kz57aLc1Nbs2YQeu4AVVZuc t82jdYRHO8CT+12TyyWSBORYmHXMZItpgX+s44oLUl3TaDSwuIerSvoYYiiNAJptoruN FUSw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=kzlHuba8P4MvElD1FdPNxqvPTXzgwnUC4uo3dduRYPU=; b=fOFpQahK2IpT9LUZz2Fhtg/1gduQ+2IXS3xnBiJtJJgKZ+Rd7/cBPPOQZvCyHKKC3t EwPa+LxzOHdp9k1uSSbXLGYy4G5/pOsF68xYbVDjODLBLhPq10s+0HckPc08sxmrqF97 Yx0pClKphie96kmK0L7YPgx3yTSprJuKsSzWs9sApU0BFMbNQ7a2d3rYv54UNC/bY3Bi MZCp6IJg26u7BoftQ+e8NTqd8GpYP8pzFe1kdIqLFl4xX4myrDC/rukjkvpAYR5JMPoL CYUGM9V2uD2hOEHHoOUHmZPHBikS/h+H9nN3eTP/cwpveixEzT/x5A6KZe/5f/surENi LmbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@valvesoftware.com header.s=mc20150811 header.b=Fh/GXlrX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si6739408plk.592.2018.02.20.14.37.53; Tue, 20 Feb 2018 14:38:18 -0800 (PST) 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=@valvesoftware.com header.s=mc20150811 header.b=Fh/GXlrX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbeBTWgJ (ORCPT + 99 others); Tue, 20 Feb 2018 17:36:09 -0500 Received: from us-smtp-delivery-172.mimecast.com ([216.205.24.172]:60866 "EHLO us-smtp-delivery-172.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeBTWgH (ORCPT ); Tue, 20 Feb 2018 17:36:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valvesoftware.com; s=mc20150811; t=1519166166; h=from:subject:date:message-id:to:mime-version:content-type:content-transfer-encoding:in-reply-to:references; bh=kzlHuba8P4MvElD1FdPNxqvPTXzgwnUC4uo3dduRYPU=; b=Fh/GXlrXTrqFClkKxtwRyLX7pQR7ImUHSQcxBJdOY/PxdrLCF+m94Od5OgD9/oH5s60FK9IJ0ob44hS/IHCYqstjhoqrB29ZFi4kyRhqWqo33KmsNXGM19hh9+izWw0qKjSWOM2HtcotcI/6pkGU3R2Ucw5zf0V/wy6SCr+11HE= Received: from smtp02.valvesoftware.com (smtp02.valvesoftware.com [208.64.203.182]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-64-KjgueYcNPai2u_0-ULcoAg-1; Tue, 20 Feb 2018 17:29:39 -0500 Received: from [172.16.1.107] (helo=antispam.valvesoftware.com) by smtp02.valvesoftware.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eoGPq-0000YD-Lo; Tue, 20 Feb 2018 14:29:38 -0800 Received: from antispam.valvesoftware.com (127.0.0.1) id hhigl40171s8; Tue, 20 Feb 2018 14:29:38 -0800 (envelope-from ) Received: from exchange17.valvemail.org ([172.16.144.21]) by antispam.valvesoftware.com ([172.16.1.107]) (SonicWALL 8.3.2.6535) with ESMTP id 201802202229380028279; Tue, 20 Feb 2018 14:29:38 -0800 Received: from [172.18.9.62] (172.18.9.62) by exchange17.valvemail.org (172.16.144.21) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 20 Feb 2018 14:29:38 -0800 Subject: Re: [PATCH v2 0/3] new driver for Valve Steam Controller To: Rodrigo Rivas Costa , Jiri Kosina , Benjamin Tissoires , , References: <20180220193306.28748-1-rodrigorivascosta@gmail.com> From: "Pierre-Loup A. Griffais" Message-ID: <673a2510-7d82-1b24-1085-9f5aa2bb9998@valvesoftware.com> Date: Tue, 20 Feb 2018 14:29:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180220193306.28748-1-rodrigorivascosta@gmail.com> Content-Language: en-US X-Mlf-Version: 8.3.2.6535 X-Mlf-UniqueId: o201802202229380028279 X-MC-Unique: KjgueYcNPai2u_0-ULcoAg-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rodrigo, Thanks for working on that! I have a few questions and remarks. For the reverse-engineering part, there's a lot of existing reference in=20 existing (user-space) drivers for the controllers like sc-controller,=20 but feel free to reach out if you have any questions. It's overall=20 pretty simple and there's nothing secret about how it functions; there=20 are some quirks, however. Nothing secret about it, but also no=20 documentation, so might as well be... Have you tried deflecting the=20 analog stick while touching the left trackpad? You'll most likely need=20 special handling there. How are you planning to expose=20 enabling/disabling auxiliary data like gyro over wireless? Will this driver being loaded affect functionality of existing=20 applications that talk to it through HID directly, like Steam or=20 sc-controller? Will they be able to keep getting the same HID data they=20 do today? If so, the extent of the work needed to support it in Steam=20 might just be to ignore the controller device it's exposing, since Steam=20 will expose that itself through its own means. Thanks, - Pierre-Loup On 02/20/2018 11:33 AM, Rodrigo Rivas Costa wrote: > This patchset implements a driver for Valve Steam Controller, based on a > reverse analysis by myself. >=20 > Notable changes from patchset v1: > * 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. >=20 > Rodrigo Rivas Costa (3): > HID: add driver for Valve Steam Controller > HID: steam: add serial number information. > HID: steam: add battery device. >=20 > drivers/hid/Kconfig | 8 + > drivers/hid/Makefile | 1 + > drivers/hid/hid-ids.h | 4 + > drivers/hid/hid-quirks.c | 4 + > drivers/hid/hid-steam.c | 703 ++++++++++++++++++++++++++++++++++++++++= +++++++ > 5 files changed, 720 insertions(+) > create mode 100644 drivers/hid/hid-steam.c >=20