From 772939810562dc03c49112b97a82ff688cb05225 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 19 Apr 2017 17:30:09 +0200 Subject: [PATCH] ps2_drv: reset mouse at startup This patch replaces the set-defaults command by a reset command, which is needed to use the Lenovo x250 trackpoint. (original patch by Christian Prochaska) --- repos/os/src/drivers/input/spec/ps2/ps2_mouse.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repos/os/src/drivers/input/spec/ps2/ps2_mouse.h b/repos/os/src/drivers/input/spec/ps2/ps2_mouse.h index d0d650e469..9201e654ce 100644 --- a/repos/os/src/drivers/input/spec/ps2/ps2_mouse.h +++ b/repos/os/src/drivers/input/spec/ps2/ps2_mouse.h @@ -31,6 +31,7 @@ class Ps2::Mouse : public Input_driver CMD_ENABLE_STREAM = 0xf4, CMD_DISABLE_STREAM = 0xf5, CMD_SET_DEFAULTS = 0xf6, + CMD_RESET = 0xff, }; enum Return @@ -174,9 +175,13 @@ class Ps2::Mouse : public Input_driver void reset() { - _aux.write(CMD_SET_DEFAULTS); + _aux.write(CMD_RESET); if (_aux.read() != RET_ACK) - Genode::warning("could not set defaults"); + Genode::warning("could not reset mouse (missing ack)"); + if (_aux.read() != 0xaa) + Genode::warning("could not reset mouse (unexpected response)"); + if (_aux.read() != 0x00) + Genode::warning("could not reset mouse (unexpected secondary response)"); _aux.write(CMD_ENABLE_STREAM); if (_aux.read() != RET_ACK)