Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Framework] Battery care support based on the cros_charge-control driver (as of Linux 6.10) #765

Open
linrunner opened this issue Oct 4, 2024 · 0 comments

Comments

@linrunner
Copy link
Owner

linrunner commented Oct 4, 2024

Based on the preliminary work from @chutz, here is a rewrite of the plugin requiring the new driver cros_charge-control released with Linux 6.10.

For the test you either need TLP 1.7.0, supplemented by the download of /usr/share/tlp/bat.d/55-framework, or you can build a package for your distribution based on Branch feature/bat.d/framework.

I need at least the output of

sudo tlp-stat -s -b 

Please also run the automatic test script (with sudo or as root) and show the output:
unit-tests/charge-thresholds_framework

It requires the tool clitest to be installed. Should be available as a package in most distributions.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/power/supply/cros_charge-control.c

@t-8ch @Simerax @chutz

linrunner added a commit that referenced this issue Oct 4, 2024
* Supports Framework Laptop 13/16 Intel/AMD
* Requires cros_charge-control module (Linux 6.10+)
* Start and stop threshold
* Force discharge not supported (planned)

* charge_control_start_threshold:
  - Valid values: 0..100 - limited to 0..99
  - Default value: 0

* charge_control_end_threshold:
  - Valid values: 0..100 - limnited to 1..100
  - Default value: 100

Credits:
* Thomas Weißschuh
* Patrick McLean

Reference:
* https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/drivers/power/supply/cros_charge-control.c?h=review-hans&id=c6ed48ef52599098498a8442fd60bea5bd8cd309
* https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/tree/drivers/power/supply/cros_charge-control.c?h=review-hans
* #765
@linrunner linrunner added this to the 1.8 Release milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant