From: Benson Leung Date: Thu, 6 Dec 2012 20:24:42 +0000 (-0800) Subject: CHROMIUM: Input: cyapa - Set to power mode OFF on remove X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=95851ef3f08627307f86f77a7f99acbfff4d4470;p=people%2Faperard%2Flinux-chromebook.git CHROMIUM: Input: cyapa - Set to power mode OFF on remove If the driver is unloaded, set the trackpad to the lowest power state. Signed-off-by: Benson Leung 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 Commit-Queue: Benson Leung Tested-by: Benson Leung --- diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index 9265b546b758f..40faa13db0226 100644 --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input/mouse/cyapa.c @@ -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);