mb/lenovo/{x201,t410}: Move ThinkLight code

This patch moves the code to control the ThinkLight to the common ACPI
folder for h8. This reduces code duplication and allows other ThinkPads
to include the same code for ThinkLight support.

Change-Id: I57de7516051bdcbb23fc21b4de352f265075893b
Signed-off-by: Stefan Ott <stefan@ott.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40664
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Stefan Ott 2020-04-22 23:20:03 +02:00 committed by Angel Pons
parent bd2dc2b764
commit cd23084284
5 changed files with 21 additions and 30 deletions

View File

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */
Method(UCMS, 1, Serialized)
{
Switch(ToInteger(Arg0))
{
Case (0x0c) /* Turn on ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(1)
}
Case (0x0d) /* Turn off ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(0)
}
}
}

View File

@ -22,18 +22,3 @@ Method(_WAK,1)
/* Not implemented. */ /* Not implemented. */
Return(Package(){0,0}) Return(Package(){0,0})
} }
Method(UCMS, 1, Serialized)
{
Switch(ToInteger(Arg0))
{
Case (0x0c) /* Turn on ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(1)
}
Case (0x0d) /* Turn off ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(0)
}
}
}

View File

@ -76,4 +76,6 @@ DefinitionBlock(
/* Dock support code */ /* Dock support code */
#include "acpi/dock.asl" #include "acpi/dock.asl"
#include <ec/lenovo/h8/acpi/thinklight.asl>
} }

View File

@ -27,21 +27,6 @@ Method(_WAK,1)
Return(Package(){0,0}) Return(Package(){0,0})
} }
Method(UCMS, 1, Serialized)
{
Switch(ToInteger(Arg0))
{
Case (0x0c) /* Turn on ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(1)
}
Case (0x0d) /* Turn off ThinkLight */
{
\_SB.PCI0.LPCB.EC.LGHT(0)
}
}
}
/* System Bus */ /* System Bus */
Scope(\_SB) Scope(\_SB)

View File

@ -76,4 +76,6 @@ DefinitionBlock(
/* Dock support code */ /* Dock support code */
#include "acpi/dock.asl" #include "acpi/dock.asl"
#include <ec/lenovo/h8/acpi/thinklight.asl>
} }