From: Mark A. Greer Date: Tue, 25 Mar 2014 15:54:38 +0000 (-0700) Subject: NFC: trf7970a: Add pm_runtime support X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~122^2^2~18^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6403b7c756f9d694332870ba0c2be7a4aa0b8c0;p=pandora-kernel.git NFC: trf7970a: Add pm_runtime support Add pm_runtime support by moving the code that enables the trf7970a to the pm_runtime hook routines. The pm_runtime 'autosuspend' feature is used so that the device isn't disabled until at least 30 seconds have passed since trf7970a_switch_rf_off() was last called. The result is that when trf7970a_switch_rf_on() is called, the device will be enabled and initialized (if it isn't already). When trf7970a_switch_rf_off() is called, it will turn off the RF immediately but leave the device enabled for at least 30 seconds. If 30 seconds have passed and the pm_runtime facility decides to suspend the driver, the device will be disabled then. Signed-off-by: Mark A. Greer Signed-off-by: Samuel Ortiz --- Reading git-diff-tree failed