summaryrefslogtreecommitdiff
path: root/src/ec/system76
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-12-26 09:38:45 +0100
committerFelix Singer <felixsinger@posteo.net>2022-12-27 09:06:29 +0000
commit42efd7f593c9d270ff330d1282d9c569d1ec709a (patch)
treebccc1e9c9bb2f9aec6c76c55611f0aafdb4f6e9b /src/ec/system76
parentfa06bcba06c5842faae797629e9f72ec28d511c0 (diff)
{superio,ec}/acpi: Replace constant "Zero" with actual number
Change-Id: I449ec5b0bbf3f24d51688efef151d3018d2848b2 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71524 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/system76')
-rw-r--r--src/ec/system76/ec/acpi/battery.asl18
-rw-r--r--src/ec/system76/ec/acpi/ec.asl14
-rw-r--r--src/ec/system76/ec/acpi/ec_ram.asl2
-rw-r--r--src/ec/system76/ec/acpi/hid.asl18
-rw-r--r--src/ec/system76/ec/acpi/s76.asl4
5 files changed, 28 insertions, 28 deletions
diff --git a/src/ec/system76/ec/acpi/battery.asl b/src/ec/system76/ec/acpi/battery.asl
index d2857a53fa..2784804aa8 100644
--- a/src/ec/system76/ec/acpi/battery.asl
+++ b/src/ec/system76/ec/acpi/battery.asl
@@ -3,12 +3,12 @@
Device (BAT0)
{
Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID
- Name (_UID, Zero) // _UID: Unique ID
+ Name (_UID, 0) // _UID: Unique ID
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
{
_SB
})
- Name (BFCC, Zero)
+ Name (BFCC, 0)
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (^^PCI0.LPCB.EC0.ECOK)
@@ -35,8 +35,8 @@ Device (BAT0)
0xFFFFFFFF, // 2 - Last Full Charge Capacity
1, // 3 - Battery Technology
0xFFFFFFFF, // 4 - Design Voltage
- Zero, // 5 - Design Capacity of Warning
- Zero, // 6 - Design Capacity of Low
+ 0, // 5 - Design Capacity of Warning
+ 0, // 6 - Design Capacity of Low
0x40, // 7 - Battery Capacity Granularity 1
0x40, // 8 - Battery Capacity Granularity 2
" ", // 9 - Model Number
@@ -53,7 +53,7 @@ Device (BAT0)
PBIF [10] = " "
PBIF [11] = " "
PBIF [12] = " "
- BFCC = Zero
+ BFCC = 0
}
Method (UPBI, 0, NotSerialized)
@@ -176,14 +176,14 @@ Device (BAT0)
Name (PBST, Package (0x04)
{
- Zero, // 0 - Battery state
+ 0, // 0 - Battery state
0xFFFFFFFF, // 1 - Battery present rate
0xFFFFFFFF, // 2 - Battery remaining capacity
0xFFFFFFFF // 3 - Battery present voltage
})
Method (IVBS, 0, NotSerialized)
{
- PBST [0] = Zero
+ PBST [0] = 0
PBST [1] = 0xFFFFFFFF
PBST [2] = 0xFFFFFFFF
PBST [3] = 0xFFFFFFFF
@@ -193,8 +193,8 @@ Device (BAT0)
{
If (^^PCI0.LPCB.EC0.BAT0)
{
- Local0 = Zero
- Local1 = Zero
+ Local0 = 0
+ Local1 = 0
If (^^AC.ACFG)
{
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
diff --git a/src/ec/system76/ec/acpi/ec.asl b/src/ec/system76/ec/acpi/ec.asl
index ff245585c2..bc171065a6 100644
--- a/src/ec/system76/ec/acpi/ec.asl
+++ b/src/ec/system76/ec/acpi/ec.asl
@@ -31,7 +31,7 @@ Device (\_SB.PCI0.LPCB.EC0)
#include "ec_ram.asl"
- Name (ECOK, Zero)
+ Name (ECOK, 0)
Method (_REG, 2, Serialized) // _REG: Region Availability
{
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
@@ -49,8 +49,8 @@ Device (\_SB.PCI0.LPCB.EC0)
^^^^BAT0.UPBS()
// Notify of changes
- Notify(^^^^AC, Zero)
- Notify(^^^^BAT0, Zero)
+ Notify(^^^^AC, 0)
+ Notify(^^^^BAT0, 0)
PNOT ()
@@ -62,7 +62,7 @@ Device (\_SB.PCI0.LPCB.EC0)
}
}
- Name (S3OS, Zero)
+ Name (S3OS, 0)
Method (PTS, 1, Serialized) {
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
If (ECOK) {
@@ -70,7 +70,7 @@ Device (\_SB.PCI0.LPCB.EC0)
S3OS = ECOS
// Clear wake cause
- WFNO = Zero
+ WFNO = 0
}
}
@@ -88,8 +88,8 @@ Device (\_SB.PCI0.LPCB.EC0)
^^^^BAT0.UPBS()
// Notify of changes
- Notify(^^^^AC, Zero)
- Notify(^^^^BAT0, Zero)
+ Notify(^^^^AC, 0)
+ Notify(^^^^BAT0, 0)
// Reset System76 Device
^^^^S76D.RSET()
diff --git a/src/ec/system76/ec/acpi/ec_ram.asl b/src/ec/system76/ec/acpi/ec_ram.asl
index 2faaeddf53..cb5bcf1444 100644
--- a/src/ec/system76/ec/acpi/ec_ram.asl
+++ b/src/ec/system76/ec/acpi/ec_ram.asl
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
+OperationRegion (ERAM, EmbeddedControl, 0, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve)
{
Offset (0x03),
diff --git a/src/ec/system76/ec/acpi/hid.asl b/src/ec/system76/ec/acpi/hid.asl
index 8bbb65bc45..eb5f420cce 100644
--- a/src/ec/system76/ec/acpi/hid.asl
+++ b/src/ec/system76/ec/acpi/hid.asl
@@ -3,19 +3,19 @@
Device (HIDD)
{
Name (_HID, "INT33D5")
- Name (HBSY, Zero)
- Name (HIDX, Zero)
- Name (HRDY, Zero)
+ Name (HBSY, 0)
+ Name (HIDX, 0)
+ Name (HRDY, 0)
Method (HDEM, 0, Serialized)
{
- HBSY = Zero
+ HBSY = 0
Return (HIDX)
}
Method (HDMM, 0, Serialized)
{
- Return (Zero)
+ Return (0)
}
Method (HDSM, 1, Serialized)
@@ -29,7 +29,7 @@ Device (HIDD)
HIDX = Arg0
Notify (HIDD, 0xC0)
- Local0 = Zero
+ Local0 = 0
While ((Local0 < 0xFA) && HBSY)
{
Sleep (0x04)
@@ -38,13 +38,13 @@ Device (HIDD)
If (HBSY == 1)
{
- HBSY = Zero
- HIDX = Zero
+ HBSY = 0
+ HIDX = 0
Return (1)
}
Else
{
- Return (Zero)
+ Return (0)
}
}
}
diff --git a/src/ec/system76/ec/acpi/s76.asl b/src/ec/system76/ec/acpi/s76.asl
index 78614ee0ea..6828be8cc3 100644
--- a/src/ec/system76/ec/acpi/s76.asl
+++ b/src/ec/system76/ec/acpi/s76.asl
@@ -100,7 +100,7 @@ Device (S76D) {
^^PCI0.LPCB.EC0.FDAT = 1
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
- ^^PCI0.LPCB.EC0.FCMD = Zero
+ ^^PCI0.LPCB.EC0.FCMD = 0
}
Return (Local0)
}
@@ -108,7 +108,7 @@ Device (S76D) {
// Set KB Led
Method (SKBL, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
- ^^PCI0.LPCB.EC0.FDAT = Zero
+ ^^PCI0.LPCB.EC0.FDAT = 0
^^PCI0.LPCB.EC0.FBUF = Arg0
^^PCI0.LPCB.EC0.FCMD = 0xCA
}