1/* SPDX-License-Identifier: GPL-2.0-only */ 2 3Device (HIDD) 4{ 5 Name (_HID, "INT33D5") 6 Name (HBSY, 0) 7 Name (HIDX, 0) 8 Name (HRDY, 0) 9 10 Method (HDEM, 0, Serialized) 11 { 12 HBSY = 0 13 Return (HIDX) 14 } 15 16 Method (HDMM, 0, Serialized) 17 { 18 Return (0) 19 } 20 21 Method (HDSM, 1, Serialized) 22 { 23 HRDY = Arg0 24 } 25 26 Method (HPEM, 1, Serialized) 27 { 28 HBSY = 1 29 HIDX = Arg0 30 31 Notify (HIDD, 0xC0) 32 Local0 = 0 33 While ((Local0 < 0xFA) && HBSY) 34 { 35 Sleep (0x04) 36 Local0++ 37 } 38 39 If (HBSY == 1) 40 { 41 HBSY = 0 42 HIDX = 0 43 Return (1) 44 } 45 Else 46 { 47 Return (0) 48 } 49 } 50} 51