* [PATCH] Input: psmouse - reset device during probe
@ 2017-06-05 20:27 Daniel Drake
2017-06-08 19:32 ` Pali Rohár
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2017-06-05 20:27 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux, chiu
New Acer laptops (Aspire A315-31 and several others) have an EC which
expects the PS/2 reset command to happen during boot.
On Linux, that means that currently the touchpad is unresponsive until
suspend/resume, when psmouse_reconnect() resets the device.
We observe that Windows sends a PS/2 reset command during boot.
Make Linux do the same here, making the touchpad usable on these
new products.
Signed-off-by: Daniel Drake <drake@endlessm.com>
---
drivers/input/mouse/psmouse-base.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index f73b47b8c578..8f3c903db7b9 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1591,6 +1591,12 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
psmouse->resync_time = parent ? 0 : psmouse_resync_time;
psmouse->smartscroll = psmouse_smartscroll;
+ /* Reset the device, even though we would ordinarily expect it to
+ * already be in the reset state. This matches Windows behaviour,
+ * which some ECs require.
+ */
+ psmouse_reset(psmouse);
+
psmouse_switch_protocol(psmouse, NULL);
if (!psmouse->protocol->smbus_companion) {
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Input: psmouse - reset device during probe
2017-06-05 20:27 [PATCH] Input: psmouse - reset device during probe Daniel Drake
@ 2017-06-08 19:32 ` Pali Rohár
2017-06-08 20:18 ` Daniel Drake
0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2017-06-08 19:32 UTC (permalink / raw)
To: Daniel Drake, dmitry.torokhov, linux-input
On Po 5. Jún 2017 22:27 Daniel Drake wrote:
> New Acer laptops (Aspire A315-31 and several others) have an EC which
> expects the PS/2 reset command to happen during boot.
>
> On Linux, that means that currently the touchpad is unresponsive until
> suspend/resume, when psmouse_reconnect() resets the device.
>
> We observe that Windows sends a PS/2 reset command during boot.
> Make Linux do the same here, making the touchpad usable on these
> new products.
>
> Signed-off-by: Daniel Drake <drake@endlessm.com>
> ---
> drivers/input/mouse/psmouse-base.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/input/mouse/psmouse-base.c
> b/drivers/input/mouse/psmouse-base.c index f73b47b8c578..8f3c903db7b9
> 100644 --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -1591,6 +1591,12 @@ static int psmouse_connect(struct serio *serio,
> struct serio_driver *drv)
> psmouse->resync_time = parent ? 0 : psmouse_resync_time;
> psmouse->smartscroll = psmouse_smartscroll;
>
> + /* Reset the device, even though we would ordinarily expect it to
> + * already be in the reset state. This matches Windows behaviour,
> + * which some ECs require.
> + */
> + psmouse_reset(psmouse);
> +
> psmouse_switch_protocol(psmouse, NULL);
>
> if (!psmouse->protocol->smbus_companion) {
This patch will slow down enumeration and initalization of *all* PS/2 mouses.
I guess if there are some problematic machines, it could be hooked...
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Input: psmouse - reset device during probe
2017-06-08 19:32 ` Pali Rohár
@ 2017-06-08 20:18 ` Daniel Drake
2017-06-08 20:27 ` Pali Rohár
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2017-06-08 20:18 UTC (permalink / raw)
To: Pali Rohár; +Cc: Dmitry Torokhov, linux-input
On Thu, Jun 8, 2017 at 1:32 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> This patch will slow down enumeration and initalization of *all* PS/2 mouses.
I know it's not ideal. but do you think anyone will be able to notice
the difference in initialization time?
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-08 20:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-05 20:27 [PATCH] Input: psmouse - reset device during probe Daniel Drake
2017-06-08 19:32 ` Pali Rohár
2017-06-08 20:18 ` Daniel Drake
2017-06-08 20:27 ` Pali Rohár
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox