1 /* SPDX-License-Identifier: GPL-2.0-only */
6 /* ACPI doesn't care if capacity is given in mWh or mAh,
7 but it has to be consistent */
11 Name(_HID, EisaId("PNP0C0A"))
14 Name(_PCL, Package(){ _SB })
17 /* battery information */
18 Name(PBIF, Package() {
20 0x01, // design capacity (mWh/mAh), updated by UPBI
21 0x01, // last full charge capacity (mWh/mAh), updated by UPBI
22 0x01, // battery technology: "rechargeable"
23 0x01, // design voltage (mV), updated by UPBI
24 0x0294, // design capacity of warning (mWh/mAh)
25 0x014a, // design capacity of low (mWh/mAh)
26 0x42, // battery capacity granularity between low and warning
27 0x42, // battery capacity granularity between warning and full
34 /* dummy values, filled in by UPBS */
35 Name(PBST, Package() {
36 0x00, // battery state
39 // bit2: critical energy state
40 0x01, // battery present rate (mW/mA)
41 0x01, // remaining capacity (mW/mA)
42 0x01 // battery present voltage (mV)
48 If(\_SB.PCI0.LPCB.EC0.ECON) {
49 If(\_SB.PCI0.LPCB.EC0.B1PR) {
50 If(\_SB.PCI0.LPCB.EC0.B1CH) {
61 If(\_SB.PCI0.LPCB.EC0.ECON) {
62 PBIF [1] = \_SB.PCI0.LPCB.EC0.B1DW
63 PBIF [2] = \_SB.PCI0.LPCB.EC0.B1FW
64 PBIF [4] = \_SB.PCI0.LPCB.EC0.B1DV
73 If(\_SB.PCI0.LPCB.EC0.ECON) {
74 Local0 = \_SB.PCI0.LPCB.EC0.B1PW
75 If (Local0 >= 0x8000) {
76 Local0 = 0x10000 - Local0
79 PBST [3] = \_SB.PCI0.LPCB.EC0.B1PV
81 PBST [2] = \_SB.PCI0.LPCB.EC0.B1RW
83 If (\_SB.PCI0.LPCB.EC0.ACCH) {
84 If (\_SB.PCI0.LPCB.EC0.B1CH) {
85 If (\_SB.PCI0.LPCB.EC0.B1CG) {
90 If (\_SB.PCI0.LPCB.EC0.B1LO) {
105 Name(_HID, EisaId("PNP0C0A"))
108 Name(_PCL, Package(){ _SB })
111 /* battery information */
112 Name(PBIF, Package() {
114 0x01, // design capacity (mWh/mAh), updated by UPBI
115 0x01, // last full charge capacity (mWh/mAh), updated by UPBI
116 0x01, // battery technology: "rechargeable"
117 0x01, // design voltage (mV), updated by UPBI
118 0x0294, // design capacity of warning (mWh/mAh)
119 0x014a, // design capacity of low (mWh/mAh)
120 0x42, // battery capacity granularity between low and warning
121 0x42, // battery capacity granularity between warning and full
128 /* dummy values, filled in by UPBS */
129 Name(PBST, Package() {
130 0x00, // battery state
133 // bit2: critical energy state
134 0x01, // battery present rate (mW/mA)
135 0x01, // remaining capacity (mW/mA)
136 0x01 // battery present voltage (mV)
142 If(\_SB.PCI0.LPCB.EC0.ECON) {
143 If(\_SB.PCI0.LPCB.EC0.B2PR) {
144 If(\_SB.PCI0.LPCB.EC0.B2CH) {
155 If(\_SB.PCI0.LPCB.EC0.ECON) {
156 PBIF [1] = \_SB.PCI0.LPCB.EC0.B2DW
157 PBIF [2] = \_SB.PCI0.LPCB.EC0.B2FW
158 PBIF [4] = \_SB.PCI0.LPCB.EC0.B2DV
167 If(\_SB.PCI0.LPCB.EC0.ECON) {
168 Local0 = \_SB.PCI0.LPCB.EC0.B2PW
169 If (Local0 >= 0x8000) {
170 Local0 = 0x10000 - Local0
173 PBST [3] = \_SB.PCI0.LPCB.EC0.B2PV
175 PBST [2] = \_SB.PCI0.LPCB.EC0.B2RW
177 If (\_SB.PCI0.LPCB.EC0.ACCH) {
178 If (\_SB.PCI0.LPCB.EC0.B2CH) {
179 If (\_SB.PCI0.LPCB.EC0.B2CG) {
184 If (\_SB.PCI0.LPCB.EC0.B2LO) {
199 Name (_HID, "ACPI0003")
202 PWRS = \_SB.PCI0.LPCB.EC0.ACCH