Function arch::sys::linux::add_goldfish_battery   
source · pub fn add_goldfish_battery(
    amls: &mut Vec<u8>,
    battery_jail: Option<Minijail>,
    mmio_bus: &Bus,
    irq_chip: &mut dyn IrqChip,
    irq_num: u32,
    resources: &mut SystemAllocator,
    swap_controller: &mut Option<SwapController>,
) -> Result<(Tube, u64), DeviceRegistrationError>Expand description
Adds goldfish battery and returns the platform needed resources including its AML data and mmio base address
§Arguments
amls- the vector to put the goldfish battery AMLbattery_jail- used when sandbox is enabledmmio_bus- bus to add the devices toirq_chip- the IrqChip object for registering irq eventsirq_num- assigned interrupt to useresources- the SystemAllocator to allocate IO and MMIO for acpi