blob: eb5f420cce9c51631385facb80c1de39140b8c20 [file] [log] [blame]
Jeremy Soller9037f0a2021-04-09 10:51:31 -06001/* SPDX-License-Identifier: GPL-2.0-only */
2
3Device (HIDD)
4{
5 Name (_HID, "INT33D5")
Felix Singerfa06bcb2022-12-26 09:32:47 +01006 Name (HBSY, 0)
7 Name (HIDX, 0)
8 Name (HRDY, 0)
Jeremy Soller9037f0a2021-04-09 10:51:31 -06009
10 Method (HDEM, 0, Serialized)
11 {
Felix Singerfa06bcb2022-12-26 09:32:47 +010012 HBSY = 0
Jeremy Soller9037f0a2021-04-09 10:51:31 -060013 Return (HIDX)
14 }
15
16 Method (HDMM, 0, Serialized)
17 {
Felix Singerfa06bcb2022-12-26 09:32:47 +010018 Return (0)
Jeremy Soller9037f0a2021-04-09 10:51:31 -060019 }
20
21 Method (HDSM, 1, Serialized)
22 {
23 HRDY = Arg0
24 }
25
26 Method (HPEM, 1, Serialized)
27 {
Felix Singerdfbb6342022-12-26 08:39:35 +010028 HBSY = 1
Jeremy Soller9037f0a2021-04-09 10:51:31 -060029 HIDX = Arg0
30
31 Notify (HIDD, 0xC0)
Felix Singerfa06bcb2022-12-26 09:32:47 +010032 Local0 = 0
Jeremy Soller9037f0a2021-04-09 10:51:31 -060033 While ((Local0 < 0xFA) && HBSY)
34 {
35 Sleep (0x04)
36 Local0++
37 }
38
Felix Singerdfbb6342022-12-26 08:39:35 +010039 If (HBSY == 1)
Jeremy Soller9037f0a2021-04-09 10:51:31 -060040 {
Felix Singerfa06bcb2022-12-26 09:32:47 +010041 HBSY = 0
42 HIDX = 0
Felix Singerdfbb6342022-12-26 08:39:35 +010043 Return (1)
Jeremy Soller9037f0a2021-04-09 10:51:31 -060044 }
45 Else
46 {
Felix Singerfa06bcb2022-12-26 09:32:47 +010047 Return (0)
Jeremy Soller9037f0a2021-04-09 10:51:31 -060048 }
49 }
50}