aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/pmu_battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/pmu_battery.c')
-rw-r--r--drivers/power/pmu_battery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/pmu_battery.c b/drivers/power/pmu_battery.c
index 9346a862f1f..023d24993b8 100644
--- a/drivers/power/pmu_battery.c
+++ b/drivers/power/pmu_battery.c
@@ -14,6 +14,7 @@
#include <linux/power_supply.h>
#include <linux/adb.h>
#include <linux/pmu.h>
+#include <linux/slab.h>
static struct pmu_battery_dev {
struct power_supply bat;
@@ -89,6 +90,8 @@ static int pmu_bat_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_STATUS:
if (pbi->flags & PMU_BATT_CHARGING)
val->intval = POWER_SUPPLY_STATUS_CHARGING;
+ else if (pmu_power_flags & PMU_PWR_AC_PRESENT)
+ val->intval = POWER_SUPPLY_STATUS_FULL;
else
val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
break;