Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this page for instructions on how to get full permissions. Sorry for the inconvenience.
source.puri.sm migrated to a new server, see new ssh key fingerprint.
According to docs, max17055 requires some inputs to correctly configure its algorithm:
It can also be configured in a more advanced way by providing it a full set of data about battery characteristics, but that's optional. The driver currently implements that full configuration path, but only when using platform data - there's no way to set it from device tree.
When setting the new config values, the gauge model has to be refreshed (Refresh
bit in ModelCfg
register). It shouldn't happen at every boot though since that doesn't allow the gauge to calibrate itself over time. It should only happen once after the gauge configuration has been reset (by taking the battery off). This can be done by checking the STATUS_POR_BIT
in MAX17042_STATUS
register, which is initially set after a gauge reset, and by unsetting it once the initial configuration is applied.
This should allow the gauge to start with a reasonable values and then actually learn to make the outputs more accurate over time.
TODO: