Skip to content

Commit

Permalink
HID: hid-steam: Avoid overwriting smoothing parameter
Browse files Browse the repository at this point in the history
The original implementation of this driver incorrectly guessed the function of
this register. It's not only unnecessary to write to this register for lizard
mode but actually counter-productive since it overwrites whatever previous
value was intentionally set, for example by Steam.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
  • Loading branch information
Vicki Pfau authored and Jiri Kosina committed Jan 2, 2024
1 parent 3f10e21 commit 34281b4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/hid/hid-steam.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ static void steam_set_lizard_mode(struct steam_device *steam, bool enable)
steam_send_report_byte(steam, STEAM_CMD_DEFAULT_MAPPINGS);
/* enable mouse */
steam_send_report_byte(steam, STEAM_CMD_DEFAULT_MOUSE);
steam_write_registers(steam,
STEAM_REG_RPAD_MARGIN, 0x01, /* enable margin */
0);

cancel_delayed_work_sync(&steam->heartbeat);
} else {
Expand All @@ -351,7 +348,6 @@ static void steam_set_lizard_mode(struct steam_device *steam, bool enable)

if (steam->quirks & STEAM_QUIRK_DECK) {
steam_write_registers(steam,
STEAM_REG_RPAD_MARGIN, 0x00, /* disable margin */
STEAM_REG_LPAD_MODE, 0x07, /* disable mouse */
STEAM_REG_RPAD_MODE, 0x07, /* disable mouse */
STEAM_REG_LPAD_CLICK_PRESSURE, 0xFFFF, /* disable clicky pad */
Expand All @@ -365,7 +361,6 @@ static void steam_set_lizard_mode(struct steam_device *steam, bool enable)
schedule_delayed_work(&steam->heartbeat, 5 * HZ);
} else {
steam_write_registers(steam,
STEAM_REG_RPAD_MARGIN, 0x00, /* disable margin */
STEAM_REG_LPAD_MODE, 0x07, /* disable mouse */
STEAM_REG_RPAD_MODE, 0x07, /* disable mouse */
0);
Expand Down

0 comments on commit 34281b4

Please sign in to comment.