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
Unknown Object (File)
Sat, Dec 21, 7:12 PM
Unknown Object (File)
Tue, Dec 17, 10:46 AM
Unknown Object (File)
Tue, Dec 17, 10:46 AM
Unknown Object (File)
Tue, Dec 17, 10:42 AM
Unknown Object (File)
Tue, Dec 17, 10:42 AM
Unknown Object (File)
Tue, Dec 17, 10:41 AM
Unknown Object (File)
Nov 22 2024, 3:05 PM
Unknown Object (File)
Nov 22 2024, 9:23 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.