]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
power: bq27x00_battery: Add manufacturer property
authorAndrew F. Davis <afd@ti.com>
Wed, 22 Jul 2015 21:51:53 +0000 (16:51 -0500)
committerSebastian Reichel <sre@kernel.org>
Fri, 24 Jul 2015 15:31:29 +0000 (17:31 +0200)
Add the manufacturer property to the bq27x00 driver.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq27x00_battery.c

index b6b98378faa32b50c0e1900c76ca4e26da3bd6c1..2257bd4e7378a1c8df243dcf73092c142d373daa 100644 (file)
@@ -41,6 +41,8 @@
 
 #define DRIVER_VERSION                 "1.2.0"
 
+#define BQ27XXX_MANUFACTURER   "Texas Instruments"
+
 #define BQ27x00_REG_TEMP               0x06
 #define BQ27x00_REG_VOLT               0x08
 #define BQ27x00_REG_AI                 0x14
@@ -142,6 +144,7 @@ static enum power_supply_property bq27x00_battery_props[] = {
        POWER_SUPPLY_PROP_ENERGY_NOW,
        POWER_SUPPLY_PROP_POWER_AVG,
        POWER_SUPPLY_PROP_HEALTH,
+       POWER_SUPPLY_PROP_MANUFACTURER,
 };
 
 static enum power_supply_property bq27425_battery_props[] = {
@@ -156,6 +159,7 @@ static enum power_supply_property bq27425_battery_props[] = {
        POWER_SUPPLY_PROP_CHARGE_FULL,
        POWER_SUPPLY_PROP_CHARGE_NOW,
        POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
+       POWER_SUPPLY_PROP_MANUFACTURER,
 };
 
 static enum power_supply_property bq27742_battery_props[] = {
@@ -174,6 +178,7 @@ static enum power_supply_property bq27742_battery_props[] = {
        POWER_SUPPLY_PROP_CYCLE_COUNT,
        POWER_SUPPLY_PROP_POWER_AVG,
        POWER_SUPPLY_PROP_HEALTH,
+       POWER_SUPPLY_PROP_MANUFACTURER,
 };
 
 static enum power_supply_property bq27510_battery_props[] = {
@@ -192,6 +197,7 @@ static enum power_supply_property bq27510_battery_props[] = {
        POWER_SUPPLY_PROP_CYCLE_COUNT,
        POWER_SUPPLY_PROP_POWER_AVG,
        POWER_SUPPLY_PROP_HEALTH,
+       POWER_SUPPLY_PROP_MANUFACTURER,
 };
 
 static unsigned int poll_interval = 360;
@@ -749,6 +755,9 @@ static int bq27x00_battery_get_property(struct power_supply *psy,
        case POWER_SUPPLY_PROP_HEALTH:
                ret = bq27x00_simple_value(di->cache.health, val);
                break;
+       case POWER_SUPPLY_PROP_MANUFACTURER:
+               val->strval = BQ27XXX_MANUFACTURER;
+               break;
        default:
                return -EINVAL;
        }