ACPI: AC: Quirk GK45 to skip reading _PSR
authorStefan Schaeckeler <schaecsn@gmx.net>
Sun, 24 Oct 2021 22:04:45 +0000 (15:04 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Oct 2021 13:34:54 +0000 (15:34 +0200)
commit3d730ee686800d71ecc5c3cb8460dcdcdeaf38a3
tree4dc9d5755d2dc00eab17fabe0d51284ef1425f90
parent3906fe9bb7f1a2c8667ae54e967dc8690824f4ea
ACPI: AC: Quirk GK45 to skip reading _PSR

Let GK45 not go into BIOS for determining the AC power state.

The BIOS wrongly returns 0, so hardcode the power state to 1.

The mini PC GK45 by Besstar Tech Lld. (aka Kodlix) just runs
off AC. It does not include any batteries. Nevertheless BIOS
reports AC off:

root@kodlix:/usr/src/linux# cat /sys/class/power_supply/ADP1/online
0

root@kodlix:/usr/src/linux# modprobe acpi_dbg
root@kodlix:/usr/src/linux# tools/power/acpi/acpidbg

- find _PSR
   \_SB.PCI0.SBRG.H_EC.ADP1._PSR Method       000000009283cee8 001 Args 0 Len 001C Aml 00000000f54e5f67

- execute \_SB.PCI0.SBRG.H_EC.ADP1._PSR
Evaluating \_SB.PCI0.SBRG.H_EC.ADP1._PSR
Evaluation of \_SB.PCI0.SBRG.H_EC.ADP1._PSR returned object 00000000dc08c187, external buffer length 18
 [Integer] = 0000000000000000

that should be

 [Integer] = 0000000000000001

Signed-off-by: Stefan Schaeckeler <schaecsn@gmx.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ac.c