blob: 4aa39961b5a82c745e58fd485a055f9a09be749a [file] [log] [blame]
Angel Pons2de6bdf2020-04-05 13:21:00 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Matt DeVillier602d0a42017-08-21 00:29:47 -05002
3Scope (\_SB.PCI0.I2C1)
4{
5 Device (MTSA)
6 {
7 Name (_HID, "MLFS0000")
8 Name (_DDN, "Melfas Touchscreen ")
9 Name (_UID, 5)
10 Name (ISTP, 0) /* TouchScreen */
11
12 Method(_CRS, 0x0, NotSerialized)
13 {
14 Name (BUF0, ResourceTemplate ()
15 {
16 I2cSerialBus(
17 0x34, /* SlaveAddress */
18 ControllerInitiated, /* SlaveMode */
19 400000, /* ConnectionSpeed */
20 AddressingMode7Bit, /* AddressingMode */
Matt DeVillier6e89d3b2018-08-16 00:17:26 -050021 "\\_SB.PCI0.I2C1", /* ResourceSource */
Matt DeVillier602d0a42017-08-21 00:29:47 -050022 )
Matt DeVillier9afe0272021-11-12 14:06:30 -060023 GpioInt (Level, ActiveLow, SharedAndWake, PullDefault,,
Elyes HAOUAS967b84d2018-10-09 22:33:11 +020024 "\\_SB.GPNC") { BOARD_TOUCH_GPIO_INDEX }
Matt DeVillier602d0a42017-08-21 00:29:47 -050025 })
26 Return (BUF0)
27 }
28
29 Method (_STA)
30 {
Felix Singer096158d2022-12-11 23:02:09 +010031 If (\S1EN == 1) {
Matt DeVillier602d0a42017-08-21 00:29:47 -050032 Return (0xF)
33 } Else {
34 Return (0x0)
35 }
36 }
Matt DeVillierdb20a082017-07-04 17:10:37 -050037#if CONFIG(CHROMEOS)
Matt DeVillier602d0a42017-08-21 00:29:47 -050038 Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
Matt DeVillierdb20a082017-07-04 17:10:37 -050039#endif
Matt DeVillier602d0a42017-08-21 00:29:47 -050040 /* Allow device to power off in S0 */
41 Name (_S0W, 4)
42 }
43}