bq27x00: Add type property
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 24 May 2010 18:36:52 +0000 (20:36 +0200)
committerLars-Peter Clausen <lars@metafoo.de>
Tue, 22 Feb 2011 10:02:38 +0000 (11:02 +0100)
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>
drivers/power/bq27x00_battery.c

index eff0273d4030d71a745f109a25754be52eaa1d8e..bb043f93cead8a2822b3b2e8814be032a32b683b 100644 (file)
@@ -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;
        }
This page took 0.02503 seconds and 5 git commands to generate.