Received: by 10.213.65.68 with SMTP id h4csp672196imn; Tue, 20 Mar 2018 12:20:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELsFfqnQswSvKlLCLwjHlCOkOK4WUVb26528GxTygNtxkalDPninpMyJp9z7q/4iShEN6ZOc X-Received: by 10.99.123.19 with SMTP id w19mr12479546pgc.405.1521573616784; Tue, 20 Mar 2018 12:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521573616; cv=none; d=google.com; s=arc-20160816; b=RoqecdvmySTxwuKsQHRDPI5Y5h4KIKQi+Y9oQyG3l14tkC4DsQZ3nNsKjGEZEaAYbA TMUJgStcdb7S7OwR5nEmjvIJKTVBrqngOBQre+nTszYTA9m6a420a3eUljs6ehUN4S4l WwxKox11QdIiftfFwMGbiCzOOBNxlR3KFLtUH8h9+7Nm9tDmRnMkOon+QVPaB3LmQm4k FcMA/AV4Lk2xPDz/T2kbSYaRN/EM4Oma2ww4IssW0Lx/ZHrOPZ6mUK+St43QDM7FMVrB kDl7KX0JfFCLdfmHGgFje3PmeIjU+KYf9MCVg1N8FjlGqtWPVoqVdQsOr4cjT34yq2Yh mJog== 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=H0EKAOgSpmh2IFd4+J3hJTztKz/SusGiaV42/F8Ft1I=; b=FjfEs+zIHXpI0YXvejleIpZzSsISlQI2jrUYKb5u/swcazxeoK6BN/HjfoI++carkw VMX4Az+k26DP0te0UG/b+FBs2W4JxmRB2F10N7m2dNhje7TUnpnBBlfnjqPfu9Kh95eo 8daeHkZYVrx96qh0YYGyOxOlgxpqxv1CrhGWYIHnRcZ9rLMa48gJGDp70BtvqGp29zOs mxW1R6AXD/mZiUE5zVxqdnbXHrF8R+zd6HPuOAU6EMpkMwtXsFaTzrpM5FFd8V541MNf FtoGypyj+Qj4qB0tJwb/SZpEyvrrhptcKGwC4mMm0oUeIyETgWbD2S1ZGXOHdQpA6VTK 1rUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HYl6l9Tz; 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 38-v6si2169386pln.397.2018.03.20.12.20.02; Tue, 20 Mar 2018 12:20:16 -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=HYl6l9Tz; 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 S1751615AbeCTTSy (ORCPT + 99 others); Tue, 20 Mar 2018 15:18:54 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33900 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbeCTTSw (ORCPT ); Tue, 20 Mar 2018 15:18:52 -0400 Received: by mail-wr0-f172.google.com with SMTP id o8so2877715wra.1; Tue, 20 Mar 2018 12:18:51 -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=H0EKAOgSpmh2IFd4+J3hJTztKz/SusGiaV42/F8Ft1I=; b=HYl6l9TzaYQb45JQ8GEymRw4LvyU9TYUm1epVBBNpE2CRAUaSNTl7EFqSag/5DDz4q hr2G1UDEB+RniCgEw7TdBcCjhCngnCM+JsISJoGxz86B2HDKgNsu2CWJwa6OkbAGes2/ 5Jp0IoKLsaz+JziA9YE/b7YB+41FQBNdLNcqNExvcazPy+dBWFtRSVB2gFB0YLC6X5lY TuLcIgM0Gntb4ohcLyZWTa3m8leHJkZj2+nnkc2yMbTinpdRiVPeTUij1gy1LUEEXfT3 wuPCdtLdEyacwiByaD5l2SLu3POPnb0lrt7E4xk6YkOIEZKEC0ME+WeQYlIizIRJh6IH ztEg== 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=H0EKAOgSpmh2IFd4+J3hJTztKz/SusGiaV42/F8Ft1I=; b=b/PxWZAE+6GKnwSuQu+W+nq/RUumP/R9HVxhedcK8Wh/z7WFpowI/dsE/jM4AcyIO9 ZBIDGL9qiItEwiGkp3rACrMTtJlVIMIqQLDFAJHV9LiL+ysjc/yMEaqyJjknH/KOkPAp qBlUKcbaCfc0wYatfo98KGj8m9GGkGFDgaVtaCx8zqy09UMxWb07bmWAyRPd3R1VGCbs ilzf89ieSxT1C7RcN9jTpT9gTlMCzUwi+C1jVNtHHp9joJOFH/VGJ75XPHfCE6FyUo/a KnDrUZEZyJkbBBt94remxiOP29XxHLOkqny7TqMAGTSD5BDrl/kPq1XVhTLct9nFSj7J n7oA== X-Gm-Message-State: AElRT7HHchFxkDE7h8/cU44VGNZw0MgN2PTao43/21F7A/FShQ0DS3Me gx/qkSBaqfRu9eRuhbz0a2o= X-Received: by 10.223.138.234 with SMTP id z39mr14880371wrz.35.1521573530980; Tue, 20 Mar 2018 12:18:50 -0700 (PDT) Received: from casa ([2a01:c50e:5126:7a00:3036:bcff:fec8:b31f]) by smtp.gmail.com with ESMTPSA id j21sm3447444wrb.49.2018.03.20.12.18.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 12:18:50 -0700 (PDT) Date: Tue, 20 Mar 2018 20:18:47 +0100 From: Rodrigo Rivas Costa To: =?iso-8859-1?Q?Cl=E9ment?= VUCHENER Cc: "Pierre-Loup A. Griffais" , Benjamin Tissoires , Jiri Kosina , Cameron Gutman , lkml , linux-input Subject: Re: [PATCH v5 0/4] new driver for Valve Steam Controller Message-ID: <20180320191847.GA23020@casa> References: <20180311195842.5551-1-rodrigorivascosta@gmail.com> <20180312205158.GB21621@casa> <20180315210659.GA16037@casa> <1c75c511-eada-585e-297f-e90feb17ac8c@valvesoftware.com> <20180319200813.GA18746@casa> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Mon, Mar 19, 2018 at 10:06:09PM +0100, Cl?ment VUCHENER wrote: > 2018-03-19 21:08 GMT+01:00 Rodrigo Rivas Costa : > > On Sat, Mar 17, 2018 at 02:54:07PM -0700, Pierre-Loup A. Griffais wrote: > > > > Now, what I would really want is a review by Valve of my set-lizard function: > > > > static void steam_set_lizard_mode(struct steam_device *steam, bool enabled) > > { > > if (enabled) { > > steam_send_report_byte(steam, 0x8e); //enable mouse > > steam_send_report_byte(steam, 0x85); //enable esc, enter and cursor keys > > } else { > > steam_send_report_byte(steam, 0x81); //disable esc, enter and cursor keys > > steam_write_register(steam, 0x08, 0x07); //disable mouse (cmd: 0x87) > > } > > } > > > > While it works, I find its asymmetry quite uncanny. I'm afraid that some > > of these are there for a side effect, this is not their real purpose. > > Could you give me a hint about this? > > > > If I remember correctly, you can also enable the mouse with "87 03 08 > 00 00". But that do not explain the asymmetry or why there are two > ways of doing it. I always found it weird that the "enable" value was > 0x0000 and the "disable" value 0x0007. This works fine, thanks. IMO, it is better than command 0x8e. I also found that register 0x07 controls the cursor keys emulation: * 87 03 07 07 00: disable * 87 03 07 03 00: enable (03 or 03 * 87 03 07 00 00: set "joystick mode" (?) But I cannot find a similar register to disable the enter/esc keys, for that I still need commands 0x85 and 0x81. Can you tell me if there is a register to configure the enter/esc emulation? That would be nice, because I could enable disable the lizard mode with a single report: (87 09 07 07 00 08 07 00 xx 07 00). Thanks. Rodrigo