Skip to content

Commit e18d259

Browse files
committedMar 16, 2025
bat.d tlp-stat -b: advertise chargeonce, discharge, recalibrate features individually
1 parent 6942c90 commit e18d259

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed
 

‎bat.d/05-thinkpad

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ batdrv_show_battery_data () {
10241024
[ "$_bm_thresh" = "natacpi" ] && fs="charge thresholds"
10251025
if [ "$_bm_dischg" = "natacpi" ]; then
10261026
[ -n "$fs" ] && fs="${fs}, "
1027-
fs="${fs}recalibration"
1027+
fs="${fs}chargeonce, discharge, recalibrate"
10281028
fi
10291029
if [ -n "$fs" ]; then
10301030
cprintf "success" "Supported features: %s\n" "$fs"

‎bat.d/10-thinkpad-legacy

+1-1
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ batdrv_show_battery_data () {
881881
[ "$_bm_thresh" = "tpsmapi" ] && fs="charge thresholds"
882882
if [ "$_bm_dischg" = "tpsmapi" ]; then
883883
[ -n "$fs" ] && fs="${fs}, "
884-
fs="${fs}recalibration"
884+
fs="${fs}chargeonce, discharge, recalibrate"
885885
fi
886886
if [ -n "$fs" ]; then
887887
cprintf "success" "Supported features: %s\n" "$fs"

‎bat.d/55-cros-ec

+4-4
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,8 @@ batdrv_show_battery_data () {
962962

963963
if [ "$_bm_thresh" != "none" ]; then
964964
case $_natacpi in
965-
0) cecho "Supported features: charge thresholds, recalibration" "success" ;;
966-
1) cecho "Supported features: charge threshold, recalibration" "success" ;;
965+
0) cecho "Supported features: charge thresholds, chargeonce, discharge, recalibrate" "success" ;;
966+
1) cecho "Supported features: charge threshold, chargeonce, discharge, recalibrate" "success" ;;
967967
esac
968968
else
969969
cprintf "warning" "Supported features: none available\n"
@@ -972,8 +972,8 @@ batdrv_show_battery_data () {
972972
printf "Driver usage:\n"
973973
# native kernel ACPI battery API
974974
case $_natacpi in
975-
0) cprintf "success" "* natacpi (%s) = active (charge thresholds, recalibration) - EC cmd v3\n" "$_batdrv_kmod" ;;
976-
1) cprintf "success" "* natacpi (%s) = active (charge threshold, recalibration) - EC cmd v2\n" "$_batdrv_kmod" ;;
975+
0) cprintf "success" "* natacpi (%s) = active (charge thresholds, force-discharge) - EC cmd v3\n" "$_batdrv_kmod" ;;
976+
1) cprintf "success" "* natacpi (%s) = active (charge threshold, force-discharge) - EC cmd v2\n" "$_batdrv_kmod" ;;
977977
32) cprintf "notice" "* natacpi (%s) = inactive (disabled by configuration)\n" "$_batdrv_kmod" ;;
978978
128) cprintf "warning" "* natacpi (%s) = inactive (insufficient kernel support)\n" "$_batdrv_kmod" ;;
979979
254) cprintf "warning" "* natacpi (%s) = inactive (laptop not supported) - EC cmd v1\n" "$_batdrv_kmod" ;;

‎changelog

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Bugfixes
1010
Battery Care:
1111
- ThinkPads:
12-
- Fix X220 discharge (Issue #793)
12+
- Fix X201, X220 discharge (Issue #793)
1313
- Fix bash completion for tlp discharge on tp-smapi models
1414

1515
+++ 1.8.0 --- 13.02.2025 +++

‎func.d/tlp-func-stat

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ print_methods_per_driver () {
741741
case $bm in
742742
_bm_read) [ "$1" = "tpsmapi" ] && m="status" ;;
743743
_bm_thresh) m="charge thresholds" ;;
744-
_bm_dischg) m="recalibration" ;;
744+
_bm_dischg) m="force-discharge" ;;
745745
esac
746746
if [ -n "$m" ]; then
747747
# concat method to output

0 commit comments

Comments
 (0)
Please sign in to comment.