I work for an industrial computer manufacturer, and we have developed a battery pack for our devices. The battery pack communicates via serial protocol with the PC. Now, we would like to integrate the battery pack more closely with the device, and make it visible to the OS.
According to the documentation from Microsoft, the way to do this is to add a _BST method to the ACPI tables, and then speak to the embedded controller, or via I2C to the battery management controller.
Is there a way to also access the serial port from ACPI / ASL code?
If not, how do we write a driver to teach Windows about the battery? On the one hand, the docs say:
PCs are expected to expose the batteries and charging subsystem through the ACPI control method interface. The battery miniport interface should not be used for platform-specific battery charging subsystems.
On the other hand, they also say:
3rd Party Battery Miniport Drivers
In Windows 10, OEMs and IHVs can develop their own 3rd party battery miniport drivers to replace the Microsoft cmbatt.sys driver and communicate directly with the battery hardware. A sample battery driver is provided by Microsoft on GitHub and as part of the WDK samples kit .
So without reworking the whole battery system, is a miniport driver the way to go?
Source: Windows Questions