Add a property for reporting the error margin expected by fuel gauge chips.
Unified · Split
| @@ -74,6 +74,21 @@ Description: · 73 unmodified lines | |||
| 74 | Access: Read, Write | 74 | Access: Read, Write |
| 75 | Valid values: 0 - 100 (percent) | 75 | Valid values: 0 - 100 (percent) |
| 76 | 76 | ||
| 77 | What: /sys/class/power_supply/<supply_name>/capacity_error_margin | ||
| 78 | Date: April 2019 | ||
| 79 | Contact: linux-pm@vger.kernel.org | ||
| 80 | Description: | ||
| 81 | Battery capacity measurement becomes unreliable without | ||
| 82 | recalibration. This values provides the maximum error | ||
| 83 | margin expected to exist by the fuel gauge in percent. | ||
| 84 | Values close to 0% will be returned after (re-)calibration | ||
| 85 | has happened. Over time the error margin will increase. | ||
| 86 | 100% means, that the capacity related values are basically | ||
| 87 | completely useless. | ||
| 88 | |||
| 89 | Access: Read | ||
| 90 | Valid values: 0 - 100 (percent) | ||
| 91 | |||
| 77 | What: /sys/class/power_supply/<supply_name>/capacity_level | 92 | What: /sys/class/power_supply/<supply_name>/capacity_level |
| 78 | Date: June 2009 | 93 | Date: June 2009 |
| 79 | Contact: linux-pm@vger.kernel.org | 94 | Contact: linux-pm@vger.kernel.org |
| @@ -178,6 +178,7 @@ static struct power_supply_attr power_supply_attrs[] = { · 177 unmodified lines | |||
| 178 | POWER_SUPPLY_ATTR(CAPACITY), | 178 | POWER_SUPPLY_ATTR(CAPACITY), |
| 179 | POWER_SUPPLY_ATTR(CAPACITY_ALERT_MIN), | 179 | POWER_SUPPLY_ATTR(CAPACITY_ALERT_MIN), |
| 180 | POWER_SUPPLY_ATTR(CAPACITY_ALERT_MAX), | 180 | POWER_SUPPLY_ATTR(CAPACITY_ALERT_MAX), |
| 181 | POWER_SUPPLY_ATTR(CAPACITY_ERROR_MARGIN), | ||
| 181 | POWER_SUPPLY_ENUM_ATTR(CAPACITY_LEVEL), | 182 | POWER_SUPPLY_ENUM_ATTR(CAPACITY_LEVEL), |
| 182 | POWER_SUPPLY_ATTR(TEMP), | 183 | POWER_SUPPLY_ATTR(TEMP), |
| 183 | POWER_SUPPLY_ATTR(TEMP_MAX), | 184 | POWER_SUPPLY_ATTR(TEMP_MAX), |
| @@ -139,6 +139,7 @@ enum power_supply_property { · 138 unmodified lines | |||
| 139 | POWER_SUPPLY_PROP_CAPACITY, /* in percents! */ | 139 | POWER_SUPPLY_PROP_CAPACITY, /* in percents! */ |
| 140 | POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, /* in percents! */ | 140 | POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, /* in percents! */ |
| 141 | POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX, /* in percents! */ | 141 | POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX, /* in percents! */ |
| 142 | POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN, /* in percents! */ | ||
| 142 | POWER_SUPPLY_PROP_CAPACITY_LEVEL, | 143 | POWER_SUPPLY_PROP_CAPACITY_LEVEL, |
| 143 | POWER_SUPPLY_PROP_TEMP, | 144 | POWER_SUPPLY_PROP_TEMP, |
| 144 | POWER_SUPPLY_PROP_TEMP_MAX, | 145 | POWER_SUPPLY_PROP_TEMP_MAX, |