Sean Rhodes has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85945?usp=email )
(
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ec/starlabs/merlin: Move common variants to respective files ......................................................................
ec/starlabs/merlin: Move common variants to respective files
Move the Q-Events used by the merlin EC to their respective files, i.e. `Q0B` for Battery Status Update to battery.asl.
This means that only revelant events will be included.
Change-Id: Ib41fbafd79b999409a520361a4d372902d878794 Signed-off-by: Sean Rhodes sean@starlabs.systems Reviewed-on: https://review.coreboot.org/c/coreboot/+/85945 Reviewed-by: Paul Menzel paulepanter@mailbox.org Reviewed-by: Matt DeVillier matt.devillier@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/starlabs/merlin/acpi/ac.asl M src/ec/starlabs/merlin/acpi/battery.asl M src/ec/starlabs/merlin/acpi/ec.asl M src/ec/starlabs/merlin/acpi/hid.asl M src/ec/starlabs/merlin/acpi/lid.asl D src/ec/starlabs/merlin/variants/merlin/events.asl 6 files changed, 36 insertions(+), 27 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Matt DeVillier: Looks good to me, approved
diff --git a/src/ec/starlabs/merlin/acpi/ac.asl b/src/ec/starlabs/merlin/acpi/ac.asl index 01dcca9..b689dd5 100644 --- a/src/ec/starlabs/merlin/acpi/ac.asl +++ b/src/ec/starlabs/merlin/acpi/ac.asl @@ -1,5 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#if CONFIG(EC_STARLABS_MERLIN) +Method (_Q0A, 0, NotSerialized) // Event: Charger Status Update +{ + Notify (ADP1, 0x80) +} +#endif + Device (ADP1) { Name (_HID, "ACPI0003") diff --git a/src/ec/starlabs/merlin/acpi/battery.asl b/src/ec/starlabs/merlin/acpi/battery.asl index 10fea6a..5f00c88 100644 --- a/src/ec/starlabs/merlin/acpi/battery.asl +++ b/src/ec/starlabs/merlin/acpi/battery.asl @@ -1,5 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#if CONFIG(EC_STARLABS_MERLIN) +Method (_Q0B, 0, NotSerialized) // Event: Battery Information Update +{ + Notify (BAT0, 0x80) +} +#endif + Device (BAT0) { Name (_HID, EisaId("PNP0C0A")) diff --git a/src/ec/starlabs/merlin/acpi/ec.asl b/src/ec/starlabs/merlin/acpi/ec.asl index 1219b82..2fc1248 100644 --- a/src/ec/starlabs/merlin/acpi/ec.asl +++ b/src/ec/starlabs/merlin/acpi/ec.asl @@ -135,7 +135,9 @@
#include "ac.asl" #include "battery.asl" +#if !CONFIG(EC_STARLABS_MERLIN) #include "events.asl" +#endif #include "lid.asl" #include "dock.asl"
diff --git a/src/ec/starlabs/merlin/acpi/hid.asl b/src/ec/starlabs/merlin/acpi/hid.asl index 15f02fc..4a85f04 100644 --- a/src/ec/starlabs/merlin/acpi/hid.asl +++ b/src/ec/starlabs/merlin/acpi/hid.asl @@ -1,5 +1,17 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#if CONFIG(EC_STARLABS_MERLIN) +Method (_Q05, 0, NotSerialized) // Event: Backlight Brightness Down +{ + ^HIDD.HPEM (20) +} + +Method (_Q06, 0, NotSerialized) // Event: Backlight Brightness Up +{ + ^HIDD.HPEM (19) +} +#endif + Device (HIDD) // HID Device { Name (_HID, "INTC1051") // Intel Ultrabook HID Platform Event Driver. diff --git a/src/ec/starlabs/merlin/acpi/lid.asl b/src/ec/starlabs/merlin/acpi/lid.asl index 0eaa2c5..83d28a0 100644 --- a/src/ec/starlabs/merlin/acpi/lid.asl +++ b/src/ec/starlabs/merlin/acpi/lid.asl @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#if CONFIG(EC_STARLABS_MERLIN) +Method (_Q0C, 0, NotSerialized) // Event: Lid Opened or Closed +{ + \LIDS = ECRD(RefOf(LSTE)) + Notify (LID0, 0x80) +} +#endif + Device (LID0) { Name (_HID, EisaId ("PNP0C0D")) diff --git a/src/ec/starlabs/merlin/variants/merlin/events.asl b/src/ec/starlabs/merlin/variants/merlin/events.asl deleted file mode 100644 index 64bb0d0..0000000 --- a/src/ec/starlabs/merlin/variants/merlin/events.asl +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -Method (_Q05, 0, NotSerialized) // Event: Backlight Brightness Down -{ - ^^^^HIDD.HPEM (20) -} - -Method (_Q06, 0, NotSerialized) // Event: Backlight Brightness Up -{ - ^^^^HIDD.HPEM (19) -} - -Method (_Q0A, 0, NotSerialized) // Event: Charger Status Update -{ - Notify (ADP1, 0x80) -} - -Method (_Q0B, 0, NotSerialized) // Event: Battery Information Update -{ - Notify (BAT0, 0x80) -} - -Method (_Q0C, 0, NotSerialized) // Event: Lid Opened or Closed -{ - \LIDS = ECRD(RefOf(LSTE)) - Notify (LID0, 0x80) -}