1 /* SPDX-License-Identifier: GPL-2.0-only */
8 Name (_STR, Unicode("Battery Charger"))
19 /* Return charger performance states defined by mainboard */
25 /* Return maximum charger current limit */
28 /* Convert size of PPSS table to index */
29 Local0 = SizeOf (\_SB.CHPS)
32 /* Check if charging is disabled (AC removed) */
33 If (\_SB.PCI0.LPCB.EC0.ACEX == 0) {
34 /* Return last power state */
37 /* Return highest power state */
44 /* Set charger current limit */
47 /* Retrieve Control (index 4) for specified PPSS level */
48 Local0 = DerefOf (DerefOf (\_SB.CHPS[ToInteger (Arg0)])[4])
50 /* Pass Control value to EC to limit charging */
51 \_SB.PCI0.LPCB.EC0.CHGS (Local0)
54 /* Initialize charger participant */
57 /* Disable charge limit */
58 \_SB.PCI0.LPCB.EC0.CHGD ()