power_supply: Prevent suspend until power supply events are processed
authorZoran Markovic <zoran.markovic@linaro.org>
Fri, 2 Aug 2013 20:38:02 +0000 (13:38 -0700)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 03:00:51 +0000 (12:00 +0900)
commit9c8b6a88f2f885488b15e717bc06c4a7a50ad9da
treea5eb9f64f1e55995d8d9ad5f124a006815102826
parentc30b5aa258374273ed1c4ee0d203a5404adc9c0b
power_supply: Prevent suspend until power supply events are processed

This patch, originally authored by Arve Hjonnevag and Todd Poynor,
prevents the system from entering suspend mode until the power supply
plug, unplug, or any other change of state event is fully processed. This
guarantees that the screen lights up and displays the battery charging
state. The implementation uses the power supply wakeup_source object.

Change-Id: I541e6a5d0567f2a731f14abc16fda30256ae93fe
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Arve Hjonnevag <arve@android.com>
Cc: Todd Poynor <toddpoynor@google.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/power_supply_core.c
include/linux/power_supply.h