If Stingray is powered up with a charger already attached, the battery
driver would not report charging to the system, even though the battery
was being charged. This charges the DS2781 battery driver to check
if a charger is already present when the driver is probed.
Change-Id: I786e34a4699a545f5a03995db5df457cd7f63773
Signed-off-by: Greg Meiste <w30289@motorola.com>
alarm_init(&di->alarm, ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
ds2781_battery_alarm);
wake_lock(&di->work_wake_lock);
+
+ /* Check for charger since it could have been detected already. */
+ battery_ext_power_changed(&di->bat);
+
queue_work(di->monitor_wqueue, &di->monitor_work);
return 0;