Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | Method (_Q0D, 0, NotSerialized) // Event: Lid Opened |
| 4 | { |
| 5 | \LIDS = LSTE |
| 6 | Notify (LID0, 0x80) |
| 7 | } |
| 8 | |
| 9 | Method (_Q0C, 0, NotSerialized) // Event: Lid Closed |
| 10 | { |
| 11 | \LIDS = LSTE |
| 12 | Notify (LID0, 0x80) |
| 13 | } |
| 14 | |
| 15 | Method (_Q0A, 0, NotSerialized) // Event: AC Power Connected |
| 16 | { |
| 17 | Notify (BAT0, 0x81) |
| 18 | Notify (ADP1, 0x80) |
| 19 | } |
| 20 | |
| 21 | Method (_Q0B, 0, NotSerialized) // Event: AC Power Disconnected |
| 22 | { |
| 23 | Notify (BAT0, 0x81) |
| 24 | Notify (BAT0, 0x80) |
| 25 | } |
| 26 | |
| 27 | Method (_Q05, 0, NotSerialized) // Event: Backlight Brightness Down |
| 28 | { |
| 29 | ^^^^HIDD.HPEM (20) |
| 30 | } |
| 31 | |
| 32 | Method (_Q06, 0, NotSerialized) // Event: Backlight Brightness Up |
| 33 | { |
| 34 | ^^^^HIDD.HPEM (19) |
| 35 | } |
| 36 | |
| 37 | Method (_Q87, 0, NotSerialized) // Event: Function Lock |
| 38 | { |
Sean Rhodes | 629f8c5 | 2022-03-10 21:11:15 +0000 | [diff] [blame] | 39 | Printf ("EC: Function Lock") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | Method (_Q88, 0, NotSerialized) // Event: Trackpad Lock |
| 43 | { |
Sean Rhodes | 629f8c5 | 2022-03-10 21:11:15 +0000 | [diff] [blame] | 44 | Printf ("EC: Trackpad Lock") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 45 | } |
Sean Rhodes | 629f8c5 | 2022-03-10 21:11:15 +0000 | [diff] [blame] | 46 | Method (_Q4A, 0, NotSerialized) // Event: Keyboard Backlight Brightness |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 47 | { |
Sean Rhodes | 629f8c5 | 2022-03-10 21:11:15 +0000 | [diff] [blame] | 48 | Printf ("EC: Keyboard Brightness") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | Method (_Q99, 0, NotSerialized) // Event: Airplane Mode |
| 52 | { |
| 53 | ^^^^HIDD.HPEM (8) |
| 54 | } |
| 55 | |
| 56 | Method (_QD5, 0, NotSerialized) // Event: 10 Second Power Button Pressed |
| 57 | { |
| 58 | Notify (HIDD, 0xCE) |
| 59 | } |
| 60 | |
| 61 | Method (_QD6, 0, NotSerialized) // Event: 10 Second Power Button Released |
| 62 | { |
| 63 | Notify (HIDD, 0xCF) |
| 64 | } |
| 65 | |
| 66 | Method (_Q22, 0, NotSerialized) // Event: CHARGER_T |
| 67 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 68 | Printf ("EC: CHARGER_T") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | Method (_Q40, 0, NotSerialized) // Event: AC and DC Power |
| 72 | { |
| 73 | SMB2 = 0xC6 |
| 74 | } |
| 75 | |
| 76 | Method (_Q41, 0, NotSerialized) // Event: Battery Charge between 0% and 20% |
| 77 | { |
| 78 | SMB2 = 0xC7 |
| 79 | } |
| 80 | |
| 81 | Method (_Q42, 0, NotSerialized) // Event: Battery Charge between 20% and 60% |
| 82 | { |
| 83 | SMB2 = 0xC8 |
| 84 | } |
| 85 | |
| 86 | Method (_Q43, 0, NotSerialized) // Event: Battery Charge between 60% and 100% |
| 87 | { |
| 88 | SMB2 = 0xC9 |
| 89 | } |
| 90 | |
| 91 | Method (_Q44, 0, NotSerialized) // Event: AC Power Only |
| 92 | { |
| 93 | SMB2 = 0xCA |
| 94 | } |
| 95 | |
| 96 | Method (_Q80, 0, NotSerialized) // Event: Volume Up |
| 97 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 98 | Printf ("EC: VOLUME_UP") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | Method (_Q81, 0, NotSerialized) // Event: Volume Down |
| 102 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 103 | Printf ("EC: VOLUME_DOWN") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | Method (_Q54, 0, NotSerialized) // Event: Power Button Press |
| 107 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 108 | Printf ("EC: PWRBTN") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | Method (_QF0, 0, NotSerialized) // Event: Temperature Report |
| 112 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 113 | Printf ("EC: Temperature Report") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 114 | } |
| 115 | |
| 116 | Method (_QF1, 0, NotSerialized) // Event: Temperature Trigger |
| 117 | { |
| 118 | // Notify (SEN3, 0x90) |
| 119 | } |
| 120 | |
| 121 | /* |
| 122 | * The below events are unique to this platform. |
| 123 | */ |
| 124 | |
| 125 | Method (_Q79, 0, NotSerialized) // Event: USB Type-C |
| 126 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 127 | Printf ("EC: USB Type-C") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | Method (_Q85, 0, NotSerialized) // Event: HOME |
| 131 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 132 | Printf ("EC: HOME") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | Method (_Q01, 0, NotSerialized) // Event: F1 Hot Key |
| 136 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 137 | Printf ("EC: F1") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | Method (_Q02, 0, NotSerialized) // Event: F2 Hot Key |
| 141 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 142 | Printf ("EC: F2") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | Method (_Q03, 0, NotSerialized) // Event: F3 Hot Key |
| 146 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 147 | Printf ("EC: F3") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | Method (_Q04, 0, NotSerialized) // Event: F4 Hot Key |
| 151 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 152 | Printf ("EC: F4") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | Method (_Q08, 0, NotSerialized) // Event: F5 Hot Key |
| 156 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 157 | Printf ("EC: F5") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | Method (_Q09, 0, NotSerialized) // Event: F6 Hot Key |
| 161 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 162 | Printf ("EC: F6") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | Method (_Q07, 0, NotSerialized) // Event: F7 Hot Key |
| 166 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 167 | Printf ("EC: F7") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | Method (_Q10, 0, NotSerialized) // Event: F10 Hot Key |
| 171 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 172 | Printf ("EC: F10") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | Method (_Q12, 0, NotSerialized) // Event: F12 Hot Key |
| 176 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 177 | Printf ("EC: F6") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 178 | } |
| 179 | |
| 180 | Method (_Q0E, 0, NotSerialized) // Event: SLEEP |
| 181 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 182 | Printf ("EC: SLEEP") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | Method (_Q13, 0, NotSerialized) // Event: BRIGHTNESS |
| 186 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 187 | Printf ("EC: BRIGHTNESS") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | Method (_Q20, 0, NotSerialized) // Event: CPU_T |
| 191 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 192 | Printf ("EC: CPU_T") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 193 | } |
| 194 | |
| 195 | Method (_Q21, 0, NotSerialized) // Event: SKIN_T |
| 196 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 197 | Printf ("EC: SKIN_T") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | Method (_Q30, 0, NotSerialized) // Event: THROT_OFF |
| 201 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 202 | Printf ("EC: THROT_OFF") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | Method (_Q31, 0, NotSerialized) // Event: THROT_LV1 |
| 206 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 207 | Printf ("EC: THROT_LV1") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | Method (_Q32, 0, NotSerialized) // Event: THROT_LV2 |
| 211 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 212 | Printf ("EC: THROT_LV2") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | Method (_Q33, 0, NotSerialized) // Event: THROT_LV3 |
| 216 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 217 | Printf ("EC: THROT_LV3") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | Method (_Q34, 0, NotSerialized) // Event: THROT_LV4 |
| 221 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 222 | Printf ("EC: THROT_LV4") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | Method (_Q35, 0, NotSerialized) // Event: THROT_LV5 |
| 226 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 227 | Printf ("EC: THROT_LV5") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 228 | } |
| 229 | |
| 230 | Method (_Q36, 0, NotSerialized) // Event: THROT_LV6 |
| 231 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 232 | Printf ("EC: THROT_LV6") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | Method (_Q37, 0, NotSerialized) // Event: THROT_LV7 |
| 236 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 237 | Printf ("EC: THROT_LV7") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 238 | } |
| 239 | |
Sean Rhodes | e8b090c | 2022-03-17 16:29:53 +0000 | [diff] [blame] | 240 | Method (_Q3B, 0, NotSerialized) // Event: CPU_DN_SPEED |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 241 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 242 | Printf ("EC: CPU_DN_SPEED") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | Method (_Q3C, 0, NotSerialized) // Event: CPU_UP_SPEED |
| 246 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 247 | Printf ("EC: CPU_UP_SPEED") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | Method (_Q3D, 0, NotSerialized) // Event: CPU_TURBO_OFF |
| 251 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 252 | Printf ("EC: CPU_TURBO_OFF") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | Method (_Q3E, 0, NotSerialized) // Event: CPU_TURBO_ON |
| 256 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 257 | Printf ("EC: CPU_TURBO_ON") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | Method (_Q3F, 0, NotSerialized) // Event: SHUTDOWN |
| 261 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 262 | Printf ("EC: SHUTDOWN") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 263 | } |
| 264 | |
| 265 | Method (_Q45, 0, NotSerialized) // Event: SENSOR_T76 |
| 266 | { |
| 267 | SMB2 = 0xCB |
| 268 | } |
| 269 | |
| 270 | Method (_Q48, 0, NotSerialized) // Event: Fan Turbo On |
| 271 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 272 | Printf ("EC: Fan Turbo On") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | Method (_Q49, 0, NotSerialized) // Event: Fan Turbo Off |
| 276 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 277 | Printf ("EC: Fan Turbo Off") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 278 | } |