mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
This is needed to support the kernel keyboard backlight driver through ACPI.
Also adds a few other memory addresses for testing this interface -
version, test, and test-compliment.
BUG=chrome-os-partner:12001
TEST=manual
- query next ACPI event
io_write8 0x66 0x84
io_read8 0x62
0x00
- read ACPI memmap version
io_write8 0x66 0x80
io_write8 0x62 0
io_read8 0x62
0x01
- extra command writes shouldn't crash
io_write8 0x66 0x80
io_write8 0x66 0x80
io_write8 0x62 1
- extra data writes shouldn't crash either
io_write8 0x62 1
io_write8 0x62 1
- write test address
io_write8 0x66 0x81
io_write8 0x62 1
io_write8 0x62 0x2a
- read it back
io_write8 0x66 0x80
io_write8 0x62 1
io_read8 0x62
0x2a
- read back test compliment
io_write8 0x66 0x80
io_write8 0x62 2
io_read8 0x62
0xd5
- set keyboard backlight to 50%
io_write8 0x66 0x81
io_write8 0x62 3
io_write8 0x62 50
- read it back
io_write8 0x66 0x80
io_write8 0x62 3
io_read8 0x62
0x32
Change-Id: I619fdbd322cdef8ffffbb882b3bbb587e364334d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28714
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>