Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apm_32.c Create Date:2022-07-28 08:22:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:apm_get_power_status - get current power state*@status: returned status*@bat: battery info*@life: estimated life* Obtain the current power status from the APM BIOS. We return a* status which gives the rough battery status, and current power* source

Proto:static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)

Type:int

Parameter:

TypeParameterName
u_short *status
u_short *bat
u_short *life
1036  func = APM_FUNC_GET_STATUS
1037  In and out = APM_DEVICE_ALL
1038  ecx = 0
1040  If get_power_status_broken Then Return APM_32_UNSUPPORTED
1042  If apm_bios_call - Make an APM BIOS 32bit call (on CPU 0)*@call: the apm_bios_call registers.* If there is an error, it is returned in @call.err. Then
1043  If Not Error: -ENOMEM, or bits 8-15 of eax Then Return APM_NO_ERROR
1045  Return Error: -ENOMEM, or bits 8-15 of eax
1047  status = In and out
1048  bat = ecx
1049  If get_power_status_swabinminutes Then
1050  life = swab16((u16)edx)
1051  life |= 0x8000
1052  Else life = edx
1054  Return Error codes
Caller
NameDescribe
proc_apm_show
apm