Skip to content

Commit

Permalink
bat.d/framework: bring back out-of-tree support
Browse files Browse the repository at this point in the history
Rationale: in case that framework_laptop preempts the module cros_charge-control,
the cros-ec plugin cannot initialize and we continue with the framework plugin.

Reference:
* #765 (comment)
  • Loading branch information
linrunner committed Oct 25, 2024
1 parent 8f3194f commit a497807
Show file tree
Hide file tree
Showing 2 changed files with 517 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bat.d/55-chromeos-ec
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,8 @@ batdrv_init () {
_bn_dischg="charge_behaviour"
_bm_dischg="natacpi"
_natacpi=0
elif [ -f "$bd/charge_control_start_threshold" ] \
&& [ ! -f "$bd/charge_control_end_threshold" ] \
&& [ ! -f "$bd/charge_behaviour" ]; then
# stop threshold sysfile only, framework_laptop driver may be active
# -> continue with next plugin i.e. framework-legacy
elif batdrv_is_framework; then
# dmi vendor is framework -> continue with next plugin i.e. framework
echo_debug "bat" "batdrv_init.${_batdrv_plugin}.no_match.sysfs"
return 1
else
Expand Down
Loading

0 comments on commit a497807

Please sign in to comment.