Page MenuHomeFreeBSD

Add support for none ACPI battery method batteries
ClosedPublic

Authored by thj on Oct 5 2018, 2:54 PM.
Tags
None
Referenced Files
F132664370: D17434.diff
Sat, Oct 18, 9:16 PM
Unknown Object (File)
Wed, Oct 8, 6:46 AM
Unknown Object (File)
Thu, Sep 25, 2:44 AM
Unknown Object (File)
Aug 29 2025, 3:02 PM
Unknown Object (File)
Aug 7 2025, 5:52 PM
Unknown Object (File)
Jul 31 2025, 2:00 PM
Unknown Object (File)
Jul 5 2025, 12:18 PM
Unknown Object (File)
Jun 30 2025, 7:40 AM
Subscribers

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
Lint Not Applicable
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.