Some smart batteries store their manufacture date, which is useful to identify the battery and/or to know about the cell quality.
Unified · Split
| @@ -680,3 +680,31 @@ Description: · 679 unmodified lines | |||
| 680 | Valid values: | 680 | Valid values: |
| 681 | - 1: enabled | 681 | - 1: enabled |
| 682 | - 0: disabled | 682 | - 0: disabled |
| 683 | |||
| 684 | What: /sys/class/power_supply/<supply_name>/manufacture_year | ||
| 685 | Date: January 2020 | ||
| 686 | Contact: linux-pm@vger.kernel.org | ||
| 687 | Description: | ||
| 688 | Reports the year (following Gregorian calendar) when the device has been | ||
| 689 | manufactured. | ||
| 690 | |||
| 691 | Access: Read | ||
| 692 | Valid values: Reported as integer | ||
| 693 | |||
| 694 | What: /sys/class/power_supply/<supply_name>/manufacture_month | ||
| 695 | Date: January 2020 | ||
| 696 | Contact: linux-pm@vger.kernel.org | ||
| 697 | Description: | ||
| 698 | Reports the month when the device has been manufactured. | ||
| 699 | |||
| 700 | Access: Read | ||
| 701 | Valid values: 1-12 | ||
| 702 | |||
| 703 | What: /sys/class/power_supply/<supply_name>/manufacture_day | ||
| 704 | Date: January 2020 | ||
| 705 | Contact: linux-pm@vger.kernel.org | ||
| 706 | Description: | ||
| 707 | Reports the day of month when the device has been manufactured. | ||
| 708 | |||
| 709 | Access: Read | ||
| 710 | Valid values: 1-31 | ||
| @@ -198,6 +198,9 @@ static struct power_supply_attr power_supply_attrs[] = { · 197 unmodified lines | |||
| 198 | POWER_SUPPLY_ATTR(PRECHARGE_CURRENT), | 198 | POWER_SUPPLY_ATTR(PRECHARGE_CURRENT), |
| 199 | POWER_SUPPLY_ATTR(CHARGE_TERM_CURRENT), | 199 | POWER_SUPPLY_ATTR(CHARGE_TERM_CURRENT), |
| 200 | POWER_SUPPLY_ATTR(CALIBRATE), | 200 | POWER_SUPPLY_ATTR(CALIBRATE), |
| 201 | POWER_SUPPLY_ATTR(MANUFACTURE_YEAR), | ||
| 202 | POWER_SUPPLY_ATTR(MANUFACTURE_MONTH), | ||
| 203 | POWER_SUPPLY_ATTR(MANUFACTURE_DAY), | ||
| 201 | /* Properties of type `const char *' */ | 204 | /* Properties of type `const char *' */ |
| 202 | POWER_SUPPLY_ATTR(MODEL_NAME), | 205 | POWER_SUPPLY_ATTR(MODEL_NAME), |
| 203 | POWER_SUPPLY_ATTR(MANUFACTURER), | 206 | POWER_SUPPLY_ATTR(MANUFACTURER), |
| @@ -159,6 +159,9 @@ enum power_supply_property { · 158 unmodified lines | |||
| 159 | POWER_SUPPLY_PROP_PRECHARGE_CURRENT, | 159 | POWER_SUPPLY_PROP_PRECHARGE_CURRENT, |
| 160 | POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, | 160 | POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, |
| 161 | POWER_SUPPLY_PROP_CALIBRATE, | 161 | POWER_SUPPLY_PROP_CALIBRATE, |
| 162 | POWER_SUPPLY_PROP_MANUFACTURE_YEAR, | ||
| 163 | POWER_SUPPLY_PROP_MANUFACTURE_MONTH, | ||
| 164 | POWER_SUPPLY_PROP_MANUFACTURE_DAY, | ||
| 162 | /* Properties of type `const char *' */ | 165 | /* Properties of type `const char *' */ |
| 163 | POWER_SUPPLY_PROP_MODEL_NAME, | 166 | POWER_SUPPLY_PROP_MODEL_NAME, |
| 164 | POWER_SUPPLY_PROP_MANUFACTURER, | 167 | POWER_SUPPLY_PROP_MANUFACTURER, |