Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a573298b authored by Marc Dietrich's avatar Marc Dietrich Committed by Greg Kroah-Hartman
Browse files

staging: nvec: ps2: disable/enable mouse on suspend/resume



This change makes the touchpad buttons work after suspend/resume.

Signed-off-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarJulian Andres Klode <jak@jak-linux.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0eedab70
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -123,6 +123,9 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
{
	struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);

	/* disable mouse */
	nvec_write_async(nvec, "\x06\xf4", 2);

	/* send cancel autoreceive */
	nvec_write_async(nvec, "\x06\x04", 2);

@@ -131,8 +134,13 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)

static int nvec_mouse_resume(struct platform_device *pdev)
{
	struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);

	ps2_startstreaming(ps2_dev.ser_dev);

	/* enable mouse */
	nvec_write_async(nvec, "\x06\xf5", 2);

	return 0;
}