diff options
author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-08-17 08:26:53 +0100 |
---|---|---|
committer | Dominggoes Isakh <drjisakh@gmail.com> | 2016-08-17 19:52:35 +0100 |
commit | 6112c4d4e3408cf2aea5a626a3e39ba3922094c5 (patch) | |
tree | 155dc062bec38c3aa0b25d2700bdc35d1b82ffda | |
parent | 9271694bc414bfacdc0854164b08d9686dc50b9b (diff) | |
download | kernel_samsung_smdk4412-6112c4d4e3408cf2aea5a626a3e39ba3922094c5.tar.gz kernel_samsung_smdk4412-6112c4d4e3408cf2aea5a626a3e39ba3922094c5.tar.bz2 kernel_samsung_smdk4412-6112c4d4e3408cf2aea5a626a3e39ba3922094c5.zip |
power: max17042_battery: Set type to UNKNOWN
This is a fuelgauge driver, not an actual battery driver.
Setting its type to 'Battery' will confuse healthd,
causing healthd to pick this driver instead of the actual battery driver
for reading battery stats.
Issue-Id: NIGHTLIES-3279
Change-Id: Ia45e74599d391a90cb526aa07a2525b64c3eec96
-rw-r--r-- | drivers/power/max17042_fuelgauge_u1.c | 2 | ||||
-rw-r--r-- | include/linux/power_supply.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/max17042_fuelgauge_u1.c b/drivers/power/max17042_fuelgauge_u1.c index 39b931c9da1..378dafe2cdd 100644 --- a/drivers/power/max17042_fuelgauge_u1.c +++ b/drivers/power/max17042_fuelgauge_u1.c @@ -884,7 +884,7 @@ static int __devinit max17042_probe(struct i2c_client *client, i2c_set_clientdata(client, chip); chip->battery.name = "fuelgauge"; - chip->battery.type = POWER_SUPPLY_TYPE_BATTERY; + chip->battery.type = POWER_SUPPLY_TYPE_UNKNOWN; chip->battery.get_property = max17042_get_property; chip->battery.set_property = max17042_set_property; chip->battery.properties = max17042_battery_props; diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 8289fca6ca6..35b7ed66b6c 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -146,6 +146,7 @@ enum power_supply_type { POWER_SUPPLY_TYPE_WIRELESS, POWER_SUPPLY_TYPE_UARTOFF, POWER_SUPPLY_TYPE_OTG, + POWER_SUPPLY_TYPE_UNKNOWN, }; enum { |