fix battery prompt on pinebook pro #1020
Open
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.
On my pinebook pro the battery level indication did not work, this PR contains the changes I had to make to fix this;
/sys/class/power_supply/cw2015-battery
, therefore I replacedbattery
with*battery
twice.charge_counter
contains an unusable value, so I removed that.As the last change might cause problems for others, I checked https://www.kernel.org/doc/html/latest/power/power_supply_class.html which explains:
Based on this description, it should not be useful to calculate the battery level. The usage of
charge_counter
was added in commit 6a1f065 for #88. I don't see a reason for the change there. In that ticket you also ask for some diagnostics, I'll also provide that, but a slightly modified version;(
charge_counter
contains 3 right now)Let me know if you need any further information.