diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2010-05-24 14:36:52 -0400 |
|---|---|---|
| committer | Lars-Peter Clausen <lars@metafoo.de> | 2011-02-22 05:02:38 -0500 |
| commit | 5661f334e8a53848552c8763f3bd63d0672b2e7b (patch) | |
| tree | c7bfc9ebcf2a76f8a4894e2c10f3b0aa032aeab7 | |
| parent | 97774672573ac4355bd12cf84b202555c1131b69 (diff) | |
bq27x00: Add type property
This patch adds the type property to the bq27x00 battery driver.
All bq27x00 are lithium ion batteries.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| -rw-r--r-- | drivers/power/bq27x00_battery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index eff0273d4030..bb043f93cead 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c | |||
| @@ -78,6 +78,7 @@ static enum power_supply_property bq27x00_battery_props[] = { | |||
| 78 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, | 78 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, |
| 79 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG, | 79 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG, |
| 80 | POWER_SUPPLY_PROP_TIME_TO_FULL_NOW, | 80 | POWER_SUPPLY_PROP_TIME_TO_FULL_NOW, |
| 81 | POWER_SUPPLY_PROP_TECHNOLOGY, | ||
| 81 | }; | 82 | }; |
| 82 | 83 | ||
| 83 | /* | 84 | /* |
| @@ -277,6 +278,9 @@ static int bq27x00_battery_get_property(struct power_supply *psy, | |||
| 277 | case POWER_SUPPLY_PROP_TIME_TO_FULL_NOW: | 278 | case POWER_SUPPLY_PROP_TIME_TO_FULL_NOW: |
| 278 | ret = bq27x00_battery_time(di, BQ27x00_REG_TTF, val); | 279 | ret = bq27x00_battery_time(di, BQ27x00_REG_TTF, val); |
| 279 | break; | 280 | break; |
| 281 | case POWER_SUPPLY_PROP_TECHNOLOGY: | ||
| 282 | val->intval = POWER_SUPPLY_TECHNOLOGY_LION; | ||
| 283 | break; | ||
| 280 | default: | 284 | default: |
| 281 | return -EINVAL; | 285 | return -EINVAL; |
| 282 | } | 286 | } |
