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 (_QA0, 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 (_Q06, 0, NotSerialized) // Event: Backlight Brightness Down |
| 28 | { |
| 29 | ^^^^HIDD.HPEM (20) |
| 30 | } |
| 31 | |
| 32 | Method (_Q07, 0, NotSerialized) // Event: Backlight Brightness Up |
| 33 | { |
| 34 | ^^^^HIDD.HPEM (19) |
| 35 | } |
| 36 | |
| 37 | Method (_Q08, 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 (_Q04, 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 | |
| 47 | Method (_Q11, 0, NotSerialized) // Event: Keyboard Backlight Brightness |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 48 | { |
Sean Rhodes | 629f8c5 | 2022-03-10 21:11:15 +0000 | [diff] [blame] | 49 | Printf ("EC: Keyboard Brightness") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | Method (_Q99, 0, NotSerialized) // Event: Airplane Mode |
| 53 | { |
| 54 | ^^^^HIDD.HPEM (8) |
| 55 | } |
| 56 | |
| 57 | Method (_QD5, 0, NotSerialized) // Event: 10 Second Power Button Pressed |
| 58 | { |
| 59 | Notify (HIDD, 0xCE) |
| 60 | } |
| 61 | |
| 62 | Method (_QD6, 0, NotSerialized) // Event: 10 Second Power Button Released |
| 63 | { |
| 64 | Notify (HIDD, 0xCF) |
| 65 | } |
| 66 | |
| 67 | Method (_Q22, 0, NotSerialized) // Event: CHARGER_T |
| 68 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 69 | Printf ("EC: CHARGER_T") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | Method (_Q40, 0, NotSerialized) // Event: AC and DC Power |
| 73 | { |
| 74 | SMB2 = 0xC6 |
| 75 | } |
| 76 | |
| 77 | Method (_Q41, 0, NotSerialized) // Event: Battery Charge between 0% and 20% |
| 78 | { |
| 79 | SMB2 = 0xC7 |
| 80 | } |
| 81 | |
| 82 | Method (_Q42, 0, NotSerialized) // Event: Battery Charge between 20% and 60% |
| 83 | { |
| 84 | SMB2 = 0xC8 |
| 85 | } |
| 86 | |
| 87 | Method (_Q43, 0, NotSerialized) // Event: Battery Charge between 60% and 100% |
| 88 | { |
| 89 | SMB2 = 0xC9 |
| 90 | } |
| 91 | |
| 92 | Method (_Q44, 0, NotSerialized) // Event: AC Power Only |
| 93 | { |
| 94 | SMB2 = 0xCA |
| 95 | } |
| 96 | |
| 97 | Method (_Q80, 0, NotSerialized) // Event: Volume Up |
| 98 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 99 | Printf ("EC: VOLUME_UP") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | Method (_Q81, 0, NotSerialized) // Event: Volume Down |
| 103 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 104 | Printf ("EC: VOLUME_DOWN") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | Method (_Q54, 0, NotSerialized) // Event: Power Button Press |
| 108 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 109 | Printf ("EC: PWRBTN") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | Method (_QF0, 0, NotSerialized) // Event: Temperature Report |
| 113 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 114 | Printf ("EC: Temperature Report") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | Method (_QF1, 0, NotSerialized) // Event: Temperature Trigger |
| 118 | { |
| 119 | // Notify (SEN3, 0x90) |
| 120 | } |
| 121 | |
| 122 | /* |
| 123 | * The below events are unique to this platform. |
| 124 | */ |
| 125 | |
| 126 | |
| 127 | Method (_Q02, 0, NotSerialized) // Event: APP |
| 128 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 129 | Printf ("EC: APP") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | Method (_Q82, 0, NotSerialized) // Event: MIC |
| 133 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 134 | Printf ("EC: MIC") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | Method (_Q83, 0, NotSerialized) // Event: MUTE |
| 138 | { |
Felix Singer | acc2ce9 | 2021-12-26 14:20:00 +0100 | [diff] [blame] | 139 | Printf ("EC: MUTE") |
Sean Rhodes | 296994b | 2021-10-14 20:58:15 +0100 | [diff] [blame] | 140 | } |