Debian Codegraph @

src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 Scope (\_SB.PCI0.I2C1)
4 {
5 Device (STSA)
6 {
7 Name (_HID, "SYTS7508")
8 Name (_CID, "PNP0C50")
9 Name (_UID, 4)
10 Name (ISTP, 0) /* TouchScreen */
11
12 /* Fetch HidDescriptorAddress, Register offset in the
13 * I2C device at which the HID descriptor can be read
14 */
15 Method (_DSM, 4, NotSerialized)
16 {
17 If (Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de"))
18 {
19 // DSM Revision
20 If (Arg2 == 0)
21 {
22 If (Arg1 == 1)
23 {
24 Return (Buffer (1)
25 {
26 0x03
27 })
28 }
29 Else
30 {
31 Return (Buffer (1)
32 {
33 0x00
34 })
35 }
36 }
37 // HID Function
38 If (Arg2 == 1)
39 {
40 Return (0x20)
41 }
42 }
43 Else
44 {
45 Return (Buffer (1)
46 {
47 0x00
48 })
49 }
50
51 Return (0)
52 }
53
54 Method(_CRS, 0x0, NotSerialized)
55 {
56 Name (BUF0, ResourceTemplate ()
57 {
58 I2cSerialBus(
59 0x20, /* SlaveAddress */
60 ControllerInitiated, /* SlaveMode */
61 400000, /* ConnectionSpeed */
62 AddressingMode7Bit, /* AddressingMode */
63 "\\_SB.PCI0.I2C1", /* ResourceSource */
64 )
65 GpioInt (Level, ActiveLow, SharedAndWake, PullDefault,,
66 "\\_SB.GPNC") { BOARD_TOUCH_GPIO_INDEX }
67 })
68 Return (BUF0)
69 }
70
71 Method (_STA)
72 {
73 If (\S1EN == 1) {
74 Return (0xF)
75 } Else {
76 Return (0x0)
77 }
78 }
79 #if CONFIG(CHROMEOS)
80 Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
81 #endif
82 /* Allow device to power off in S0 */
83 Name (_S0W, 4)
84 }
85 }