提交 5661f334 编写于 作者: L Lars-Peter Clausen

bq27x00: Add type property

This patch adds the type property to the bq27x00 battery driver.
All bq27x00 are lithium ion batteries.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Acked-by: NRodolfo Giometti <giometti@linux.it>
Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
上级 97774672
......@@ -78,6 +78,7 @@ static enum power_supply_property bq27x00_battery_props[] = {
POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG,
POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
POWER_SUPPLY_PROP_TECHNOLOGY,
};
/*
......@@ -277,6 +278,9 @@ static int bq27x00_battery_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_TIME_TO_FULL_NOW:
ret = bq27x00_battery_time(di, BQ27x00_REG_TTF, val);
break;
case POWER_SUPPLY_PROP_TECHNOLOGY:
val->intval = POWER_SUPPLY_TECHNOLOGY_LION;
break;
default:
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册