Page MenuHomeFreeBSD

Add support for none ACPI battery method batteries
ClosedPublic

Authored by thj on Oct 5 2018, 2:54 PM.

Details

Summary

Remove the requirement that a device be a ACPI method battery to be supported
as a battery.

Require now that the device to be in the battery devclass and implement the
get_status and get_info functions. This allows batteries which are not ACPI
method batteries to be supported in the system.

Test Plan

Verify the battery ioctl interface functions with this change using acpiconf

  1. acpiconf -i 0 # or battery number

Tested on device with a non acpi battery method driver and on a device (2015
macbook air) with a control method battery (cmbat).

I am trying to track down a device with a smart battery (smbat) to test with,
but do not expect a difference in behaviour.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

FYI, it looks like there was a typo in the description:

"Require now that the device to be in the battery devclass and implement the..."

Otherwise, it looks good.

Unless this fixes a regression (which I don't think is true), I would wait until after the code freeze is lifted to commit this.

This revision is now accepted and ready to land.Oct 5 2018, 4:29 PM
This revision was automatically updated to reflect the committed changes.