aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/ab5500_btemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/ab5500_btemp.c')
-rw-r--r--drivers/power/ab5500_btemp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/power/ab5500_btemp.c b/drivers/power/ab5500_btemp.c
index 8b6ff82a86b..04ad6bbb7ac 100644
--- a/drivers/power/ab5500_btemp.c
+++ b/drivers/power/ab5500_btemp.c
@@ -536,7 +536,15 @@ static int ab5500_btemp_get_property(struct power_supply *psy,
val->intval = di->bat->bat_type[di->bat->batt_id].name;
break;
case POWER_SUPPLY_PROP_TEMP:
- val->intval = di->bat_temp * 10;
+ if (di->bat->batt_id == BATTERY_UNKNOWN)
+ /*
+ * In case the battery is not identified, its assumed that
+ * we are using the power supply and since no monitoring is
+ * done for the same, a nominal temp is hardocded.
+ */
+ val->intval = 250;
+ else
+ val->intval = di->bat_temp * 10;
break;
default:
return -EINVAL;