]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: Input: cyapa - Set to power mode OFF on remove
authorBenson Leung <bleung@chromium.org>
Thu, 6 Dec 2012 20:24:42 +0000 (12:24 -0800)
committerChromeBot <chrome-bot@google.com>
Sat, 16 Feb 2013 00:11:55 +0000 (16:11 -0800)
If the driver is unloaded, set the trackpad to the lowest
power state.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:21047
TEST=Set CONFIG_MOUSE_CYAPA=m in the chromeos config.
Builds clean.
Load the driver on a test system with the trackpad INT line scoped.
Check that the touchpad is functional.
rmmod cyapa to unload the cyapa module.
Click on the trackpad.
Check that the INT line does not assert on the scope, indicating
that the trackpad is indeed in OFF power state.

Change-Id: I11528776c82468a2d35a21fe22f5a6c7781d7ec0
Reviewed-on: https://gerrit.chromium.org/gerrit/42281
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
drivers/input/mouse/cyapa.c

index 9265b546b758f143c1350d24017d05df82e60c0b..40faa13db02269f27b5c3ff56fc972d335ebde0c 100644 (file)
@@ -2158,6 +2158,7 @@ static int __devexit cyapa_remove(struct i2c_client *client)
        if (cyapa->input)
                input_unregister_device(cyapa->input);
 
+       cyapa_set_power_mode(cyapa, PWR_MODE_OFF);
        kfree(cyapa->read_fw_image);
        kfree(cyapa);