Commit 1e4f30ea authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak Committed by Sebastian Reichel

power: supply: max17042_battery: clean up MAX17055_V_empty

This register is same as in MAX17047 and MAX17050, so there's no need
for custom casing it.
Signed-off-by: default avatarSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 565efae9
......@@ -283,8 +283,6 @@ static int max17042_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
if (chip->chip_type == MAXIM_DEVICE_TYPE_MAX17042)
ret = regmap_read(map, MAX17042_V_empty, &data);
else if (chip->chip_type == MAXIM_DEVICE_TYPE_MAX17055)
ret = regmap_read(map, MAX17055_V_empty, &data);
else
ret = regmap_read(map, MAX17047_V_empty, &data);
if (ret < 0)
......@@ -778,8 +776,6 @@ static inline void max17042_override_por_values(struct max17042_chip *chip)
if (chip->chip_type == MAXIM_DEVICE_TYPE_MAX17042)
max17042_override_por(map, MAX17042_V_empty, config->vempty);
if (chip->chip_type == MAXIM_DEVICE_TYPE_MAX17055)
max17042_override_por(map, MAX17055_V_empty, config->vempty);
else
max17042_override_por(map, MAX17047_V_empty, config->vempty);
max17042_override_por(map, MAX17042_TempNom, config->temp_nom);
......
......@@ -113,7 +113,6 @@ enum max17042_register {
enum max17055_register {
MAX17055_QRes = 0x0C,
MAX17055_TTF = 0x20,
MAX17055_V_empty = 0x3A,
MAX17055_TIMER = 0x3E,
MAX17055_USER_MEM = 0x40,
MAX17055_RGAIN = 0x42,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment