mb/google/brya/acpi: Add support for GPS_REQUESTDXSTATE

Implement the GPS_REQUESTDXSTATE function which forces the
current D notifier state to re-report.

TEST=verified that notifications are forced out when invoked using
acpiexec
BUG=b:271938907
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Change-Id: I6dab9b793fe1d0b1c875eddbe6ae324d2894efe6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Tarun Tuli 2023-03-21 14:25:04 +00:00 committed by Felix Held
parent 4877c1c068
commit a0353b573d
1 changed files with 11 additions and 1 deletions

View File

@ -4,11 +4,14 @@
#define GPS_FUNC_GETCALLBACKS 0x13
#define GPS_FUNC_PSHARESTATUS 0x20
#define GPS_FUNC_PSHAREPARAMS 0x2a
#define GPS_FUNC_REQUESTDXSTATE 0x12
#define QUERY_GET_STATUS 0
#define QUERY_GET_SUPPORTED_FIELDS 1
#define QUERY_GET_CURRENT_LIMITS 2
#define EC_D_NOTIFY_MASK 0x7
/* GPS return Package */
Name (GPSP, Buffer (0x28) {0x0})
CreateDWordField (GPSP, 0, RETN)
@ -31,7 +34,8 @@ Method (GPS, 2, Serialized)
(1 << GPS_FUNC_SUPPORT) |
(1 << GPS_FUNC_GETCALLBACKS) |
(1 << GPS_FUNC_PSHARESTATUS) |
(1 << GPS_FUNC_PSHAREPARAMS)))
(1 << GPS_FUNC_PSHAREPARAMS) |
(1 << GPS_FUNC_REQUESTDXSTATE)))
}
Case (GPS_FUNC_GETCALLBACKS)
{
@ -88,6 +92,12 @@ Method (GPS, 2, Serialized)
}
}
}
Case (GPS_FUNC_REQUESTDXSTATE)
{
Local0 = ToInteger(\_SB.PCI0.LPCB.EC0.GPUD) & EC_D_NOTIFY_MASK
\_SB.PCI0.PEG0.PEGP.DNOT (Local0, 1)
Return (NV_ERROR_SUCCESS)
}
}
Return (NV_ERROR_UNSUPPORTED)