Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions drivers/power/supply/macsmc-power.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,17 @@ static int macsmc_power_probe(struct platform_device *pdev)
props[nprops++] = POWER_SUPPLY_PROP_SCOPE;
props[nprops++] = POWER_SUPPLY_PROP_MODEL_NAME;
props[nprops++] = POWER_SUPPLY_PROP_SERIAL_NUMBER;
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_YEAR;
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_MONTH;
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_DAY;
/*
* BMDT is the manufacture date as YYMMDD from 1992. On the
* J700 it does not follow that layout (it decodes to 2082) and
* macOS reports no manufacture date for the battery: leave the
* date out there rather than report a wrong one.
*/
if (!of_machine_is_compatible("apple,j700")) {
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_YEAR;
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_MONTH;
props[nprops++] = POWER_SUPPLY_PROP_MANUFACTURE_DAY;
}

/* Extended properties usually present */
props[nprops++] = POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW;
Expand Down
Loading