diff options
| author | Arve Hjønnevåg <arve@android.com> | 2009-09-21 17:26:47 -0700 |
|---|---|---|
| committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 13:40:19 -0700 |
| commit | e65ffa2cce8c6256b9423b72db8bb9bc65f1410e (patch) | |
| tree | 1c05aa07b2c1fbabdc9720da5b0118da965c81c4 /include | |
| parent | 0a969e928c7d8fd5b245fdcf47f35bc3ff1c30e1 (diff) | |
| download | olio-linux-3.10-e65ffa2cce8c6256b9423b72db8bb9bc65f1410e.tar.xz olio-linux-3.10-e65ffa2cce8c6256b9423b72db8bb9bc65f1410e.zip | |
power_supply: Hold a wake_lock while power supply change notifications are pending
When connecting usb or the charger the device would often go back to sleep
before the charge led and screen turned on.
Change-Id: I01def6d86ddece0d4e31d2a91d176ed0975b6b9d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/power_supply.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 3828cefb4f6..0b925bf0375 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -13,6 +13,7 @@ #ifndef __LINUX_POWER_SUPPLY_H__ #define __LINUX_POWER_SUPPLY_H__ +#include <linux/wakelock.h> #include <linux/workqueue.h> #include <linux/leds.h> @@ -194,6 +195,9 @@ struct power_supply { /* private */ struct device *dev; struct work_struct changed_work; + spinlock_t changed_lock; + bool changed; + struct wake_lock work_wake_lock; #ifdef CONFIG_THERMAL struct thermal_zone_device *tzd; struct thermal_cooling_device *tcd; |