linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
To: "Clément VUCHENER" <clement.vuchener@gmail.com>
Cc: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jikos@kernel.org>,
	Cameron Gutman <aicommander@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-input <linux-input@vger.kernel.org>
Subject: Re: [PATCH v5 0/4] new driver for Valve Steam Controller
Date: Tue, 20 Mar 2018 20:18:47 +0100	[thread overview]
Message-ID: <20180320191847.GA23020@casa> (raw)
In-Reply-To: <CAM4jgCpNptQz4nP1u0pcBo5fYXJxpxyR4j2U5YBCY2xiev0wug@mail.gmail.com>

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 <rodrigorivascosta@gmail.com>:
> > 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

  reply	other threads:[~2018-03-20 19:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 19:58 [PATCH v5 0/4] new driver for Valve Steam Controller Rodrigo Rivas Costa
2018-03-11 19:58 ` [PATCH v5 1/4] HID: add " Rodrigo Rivas Costa
2018-03-11 19:58 ` [PATCH v5 2/4] HID: steam: add serial number information Rodrigo Rivas Costa
2018-03-11 19:58 ` [PATCH v5 3/4] HID: steam: command to check wireless connection Rodrigo Rivas Costa
2018-03-11 19:58 ` [PATCH v5 4/4] HID: steam: add battery device Rodrigo Rivas Costa
2018-03-11 23:12 ` [PATCH v5 0/4] new driver for Valve Steam Controller Pierre-Loup A. Griffais
2018-03-12  7:35   ` Rodrigo Rivas Costa
2018-03-12 14:30 ` Clément VUCHENER
2018-03-12 20:51   ` Rodrigo Rivas Costa
2018-03-14 16:39     ` Benjamin Tissoires
2018-03-15 21:06       ` Rodrigo Rivas Costa
2018-03-17 21:54         ` Pierre-Loup A. Griffais
2018-03-19 20:08           ` Rodrigo Rivas Costa
2018-03-19 21:06             ` Clément VUCHENER
2018-03-20 19:18               ` Rodrigo Rivas Costa [this message]
2018-03-21 15:47             ` Benjamin Tissoires
2018-03-21 17:56               ` Rodrigo Rivas Costa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180320191847.GA23020@casa \
    --to=rodrigorivascosta@gmail.com \
    --cc=aicommander@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=clement.vuchener@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pgriffais@valvesoftware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).