aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2015-07-22 17:51:53 -0400
committerSebastian Reichel <sre@kernel.org>2015-07-24 11:31:29 -0400
commitdb04fc5caa79260170a68d58db8fc401f1ab05f5 (patch)
tree89d84c2e389ce2757cf8e6c2beaebcbc007df891
parentdd9f1486ae207cd947416f1bdc461edc4880f2df (diff)
power: bq27x00_battery: Add manufacturer property
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>
-rw-r--r--drivers/power/bq27x00_battery.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
index b6b98378faa3..2257bd4e7378 100644
--- a/drivers/power/bq27x00_battery.c
+++ b/drivers/power/bq27x00_battery.c
@@ -41,6 +41,8 @@
41 41
42#define DRIVER_VERSION "1.2.0" 42#define DRIVER_VERSION "1.2.0"
43 43
44#define BQ27XXX_MANUFACTURER "Texas Instruments"
45
44#define BQ27x00_REG_TEMP 0x06 46#define BQ27x00_REG_TEMP 0x06
45#define BQ27x00_REG_VOLT 0x08 47#define BQ27x00_REG_VOLT 0x08
46#define BQ27x00_REG_AI 0x14 48#define BQ27x00_REG_AI 0x14
@@ -142,6 +144,7 @@ static enum power_supply_property bq27x00_battery_props[] = {
142 POWER_SUPPLY_PROP_ENERGY_NOW, 144 POWER_SUPPLY_PROP_ENERGY_NOW,
143 POWER_SUPPLY_PROP_POWER_AVG, 145 POWER_SUPPLY_PROP_POWER_AVG,
144 POWER_SUPPLY_PROP_HEALTH, 146 POWER_SUPPLY_PROP_HEALTH,
147 POWER_SUPPLY_PROP_MANUFACTURER,
145}; 148};
146 149
147static enum power_supply_property bq27425_battery_props[] = { 150static enum power_supply_property bq27425_battery_props[] = {
@@ -156,6 +159,7 @@ static enum power_supply_property bq27425_battery_props[] = {
156 POWER_SUPPLY_PROP_CHARGE_FULL, 159 POWER_SUPPLY_PROP_CHARGE_FULL,
157 POWER_SUPPLY_PROP_CHARGE_NOW, 160 POWER_SUPPLY_PROP_CHARGE_NOW,
158 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, 161 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
162 POWER_SUPPLY_PROP_MANUFACTURER,
159}; 163};
160 164
161static enum power_supply_property bq27742_battery_props[] = { 165static enum power_supply_property bq27742_battery_props[] = {
@@ -174,6 +178,7 @@ static enum power_supply_property bq27742_battery_props[] = {
174 POWER_SUPPLY_PROP_CYCLE_COUNT, 178 POWER_SUPPLY_PROP_CYCLE_COUNT,
175 POWER_SUPPLY_PROP_POWER_AVG, 179 POWER_SUPPLY_PROP_POWER_AVG,
176 POWER_SUPPLY_PROP_HEALTH, 180 POWER_SUPPLY_PROP_HEALTH,
181 POWER_SUPPLY_PROP_MANUFACTURER,
177}; 182};
178 183
179static enum power_supply_property bq27510_battery_props[] = { 184static enum power_supply_property bq27510_battery_props[] = {
@@ -192,6 +197,7 @@ static enum power_supply_property bq27510_battery_props[] = {
192 POWER_SUPPLY_PROP_CYCLE_COUNT, 197 POWER_SUPPLY_PROP_CYCLE_COUNT,
193 POWER_SUPPLY_PROP_POWER_AVG, 198 POWER_SUPPLY_PROP_POWER_AVG,
194 POWER_SUPPLY_PROP_HEALTH, 199 POWER_SUPPLY_PROP_HEALTH,
200 POWER_SUPPLY_PROP_MANUFACTURER,
195}; 201};
196 202
197static unsigned int poll_interval = 360; 203static unsigned int poll_interval = 360;
@@ -749,6 +755,9 @@ static int bq27x00_battery_get_property(struct power_supply *psy,
749 case POWER_SUPPLY_PROP_HEALTH: 755 case POWER_SUPPLY_PROP_HEALTH:
750 ret = bq27x00_simple_value(di->cache.health, val); 756 ret = bq27x00_simple_value(di->cache.health, val);
751 break; 757 break;
758 case POWER_SUPPLY_PROP_MANUFACTURER:
759 val->strval = BQ27XXX_MANUFACTURER;
760 break;
752 default: 761 default:
753 return -EINVAL; 762 return -EINVAL;
754 } 763 }