aboutsummaryrefslogtreecommitdiffstats
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 9346a862f1f2..023d24993b87 100644
--- a/drivers/power/pmu_battery.c
+++ b/drivers/power/pmu_battery.c
@@ -14,6 +14,7 @@
14#include <linux/power_supply.h> 14#include <linux/power_supply.h>
15#include <linux/adb.h> 15#include <linux/adb.h>
16#include <linux/pmu.h> 16#include <linux/pmu.h>
17#include <linux/slab.h>
17 18
18static struct pmu_battery_dev { 19static struct pmu_battery_dev {
19 struct power_supply bat; 20 struct power_supply bat;
@@ -89,6 +90,8 @@ static int pmu_bat_get_property(struct power_supply *psy,
89 case POWER_SUPPLY_PROP_STATUS: 90 case POWER_SUPPLY_PROP_STATUS:
90 if (pbi->flags & PMU_BATT_CHARGING) 91 if (pbi->flags & PMU_BATT_CHARGING)
91 val->intval = POWER_SUPPLY_STATUS_CHARGING; 92 val->intval = POWER_SUPPLY_STATUS_CHARGING;
93 else if (pmu_power_flags & PMU_PWR_AC_PRESENT)
94 val->intval = POWER_SUPPLY_STATUS_FULL;
92 else 95 else
93 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; 96 val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
94 break; 97 break;