Support smart charging and battery authentication status#167
Open
petm5 wants to merge 2 commits into
Open
Conversation
Authentic batteries in Surface devices are verified and paired with the motherboard during manufacturing or repair for quality assurance. Read the authentication status from the SAM and report it.
Newer Surface devices limit the battery charge to 80% based on usage patterns. Report the charge limit status and disengage it if requested. The charge limit is always controlled by the SAM and will be re-enabled after a few days depending on use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for battery features reverse-engineered from the Windows drivers.
Authentic batteries in Surface devices are verified and paired with the motherboard during manufacturing or repair for quality assurance. Windows reads the authentication status and shows a warning message if the battery isn't genuine. This status can now be read from Linux.
Newer Surface devices limit the battery charge to 80% based on usage patterns. The Surface app on Windows has a button that disables the limit temporarily and charges the battery to 100%, but Linux previously had no way to control it. The battery driver now reports the smart charging status as a charge limit and lets users disable it by setting it to 100%. The charge limit is controlled by the SAM and gets re-enabled automatically after a few days, and re-enabling the limit manually doesn't seem to be possible.
Fixes linux-surface/linux-surface#1781, linux-surface/linux-surface#2070.