The factor 4 that you see should thus come from 1. a factor 2 because we do 5.0μVh/10mOhm instead of 5.0μVh/5mOhm. 2. a factor 2 because we do not take into account lsb. MAX_M5_TASKPERIOD is reg 0x3c which is not mentionned at all in the datasheet of the max17201. I guess this might be another difference between the two devices. I think the best course of action is to correct the computation to take into account rsense and to then multiply by lsb only for max77759. This would make the behaviour of the max17201 follow the datasheet. > [...] > >> @@ -483,14 +608,27 @@ static int max1720x_probe(struct i2c_client *client) >> psy_cfg.drv_data = info; >> psy_cfg.fwnode = dev_fwnode(dev); >> i2c_set_clientdata(client, info); >> - info->regmap = devm_regmap_init_i2c(client, &max1720x_regmap_cfg); >> + >> + data = device_get_match_data(dev); >> + if (!data) >> + return dev_err_probe(dev, ret, "Failed to get chip data\n"); > ^^^ > This should be -EINVAL. Indeed, will fix. Best regards, Thomas