From: xuwei9 Date: Wed, 9 Jan 2019 09:00:25 +0000 (+0800) Subject: kernel:fuelgauge change X-Git-Tag: MMI-QSAS30.62-33-3~306 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4010b967d3d750ce2a41cd7d0466f8baa7b4786b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git kernel:fuelgauge change Change-Id: I220cb485941b70c2e53e22fb2123ca82dcc17009 --- diff --git a/drivers/power/supply/s2mu106_fuelgauge.c b/drivers/power/supply/s2mu106_fuelgauge.c index 013b168eae0a..455a89d939e2 100755 --- a/drivers/power/supply/s2mu106_fuelgauge.c +++ b/drivers/power/supply/s2mu106_fuelgauge.c @@ -235,16 +235,6 @@ static void s2mu106_reset_fg(struct s2mu106_fuelgauge_data *fuelgauge) s2mu106_write_and_verify_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, temp); s2mu106_read_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, &temp); - pr_info("%s: S2MU106_REG_FG_ID = 0x%02x, data ver. = 0x%x\n", __func__, - temp, fuelgauge->info.battery_param_ver); - - /* Update battery parameter version */ - s2mu106_read_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, &temp); - temp &= 0xF0; - temp |= (fuelgauge->info.battery_param_ver & 0x0F); - s2mu106_write_and_verify_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, temp); - s2mu106_read_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, &temp); - pr_info("%s: S2MU106_REG_FG_ID = 0x%02x, data ver. = 0x%x\n", __func__, temp, fuelgauge->info.battery_param_ver); @@ -1706,6 +1696,11 @@ static int s2mu106_fuelgauge_parse_dt(struct s2mu106_fuelgauge_data *fuelgauge) if (ret < 0) pr_err("%s There is no cell2 battery parameter version\n", __func__); + ret = of_property_read_u32(np, "battery,battery_param_ver_cell1", + &fuelgauge->info.battery_param_ver_cell1); + if (ret < 0) + pr_err("%s There is no cell1 battery parameter version\n", __func__); + ret = of_property_read_u32(np, "battery,low_temp_limit", &fuelgauge->low_temp_limit); if (ret < 0) { @@ -1879,10 +1874,6 @@ static int s2mu106_fuelgauge_probe(struct i2c_client *client, #endif fuelgauge->probe_done = true; - s2mu106_read_reg_byte(fuelgauge->i2c, S2MU106_REG_FG_ID, &temp); - pr_info("%s: parameter ver. in IC: 0x%02x, in kernel: 0x%02x\n", __func__, - temp & 0x0F, fuelgauge->info.battery_param_ver); - pr_info("%s: S2MU106 Fuelgauge Driver Loaded\n", __func__); return 0;