AddDevice routine for battery miniclass drivers

Every battery miniclass driver must have an AddDevice routine to initialize battery-specific state. The PnP Manager calls the AddDevice routine for each battery device controlled by this miniclass driver.

In addition to the tasks required of a PnP AddDevice routine, the AddDevice routine for a battery miniclass driver must also:

  1. Create an FDO for the battery and attach the FDO to the device stack for the controller.
  2. Initialize the BATTERY_MINIPORT_INFO structure and call BatteryClassInitializeDevice to register the miniclass driver with the battery class driver.
  3. Perform any other required initialization for the device.