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)
Jan 11 2024, 9:55 PM
Unknown Object (File)
Jan 4 2024, 8:26 PM
Unknown Object (File)
Dec 20 2023, 7:08 AM
Unknown Object (File)
Nov 27 2023, 1:57 PM
Unknown Object (File)
Nov 24 2023, 4:06 AM
Unknown Object (File)
Nov 23 2023, 4:38 PM
Unknown Object (File)
Nov 7 2023, 12:34 PM
Unknown Object (File)
Nov 4 2023, 7:41 PM
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.