1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 Name (_HID, EisaId ("PNP0C0A"))
7 Name (_PCL, Package () { \_SB })
9 Method (_STA, 0, NotSerialized)
21 Name (PBIF, Package () {
22 0x00000001, /* 0x00: Power Unit: mAH */
23 0xFFFFFFFF, /* 0x01: Design Capacity */
24 0xFFFFFFFF, /* 0x02: Last Full Charge Capacity */
25 0x00000001, /* 0x03: Battery Technology: Rechargeable */
26 0xFFFFFFFF, /* 0x04: Design Voltage */
27 0x00000000, /* 0x05: Design Capacity of Warning */
28 0xFFFFFFFF, /* 0x06: Design Capacity of Low */
29 0x00000001, /* 0x07: Capacity Granularity 1 */
30 0x00000001, /* 0x08: Capacity Granularity 2 */
31 "Y91", /* 0x09: Model Number */
32 "", /* 0x0a: Serial Number */
33 "LION", /* 0x0b: Battery Type */
34 "CJOYIN" /* 0x0c: OEM Information */
37 Method (_BIF, 0, Serialized)
40 PBIF[1] = DGCP * 10000 / DGVO
42 /* Last Full Charge Capacity */
43 PBIF[2] = FLCP * 10000 / DGVO
48 /* Design Capacity of Warning */
49 PBIF[5] = BDW * 10000 / DGVO
51 /* Design Capacity of Low */
57 Name (PBST, Package () {
58 0x00000000, /* 0x00: Battery State */
59 0xFFFFFFFF, /* 0x01: Battery Present Rate */
60 0xFFFFFFFF, /* 0x02: Battery Remaining Capacity */
61 0xFFFFFFFF, /* 0x03: Battery Present Voltage */
64 Method (_BST, 0, NotSerialized) // _BST: Battery Status
71 * bit 2 = critical level
76 * 1: BATTERY PRESENT RATE
81 * 2: BATTERY REMAINING CAPACITY
83 PBST[2] = BRC * 10000 / DGVO
86 * 3: BATTERY PRESENT VOLTAGE