Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2012 The Chromium OS Authors. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | /* |
| 17 | * The mainboard must define a PNOT method to handle power |
| 18 | * state notifications and Notify CPU device objects to |
| 19 | * re-evaluate their _PPC and _CST tables. |
| 20 | */ |
| 21 | |
Duncan Laurie | d338b46 | 2013-07-31 15:30:41 -0700 | [diff] [blame] | 22 | // Mainboard specific throttle handler |
| 23 | External (\_TZ.THRT, MethodObj) |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 24 | External (\_SB.DPTF.TEVT, MethodObj) |
Duncan Laurie | 3f1500f | 2014-03-06 08:37:49 -0800 | [diff] [blame] | 25 | External (\_SB.DPTF.TCHG, DeviceObj) |
Duncan Laurie | d338b46 | 2013-07-31 15:30:41 -0700 | [diff] [blame] | 26 | |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 27 | Device (EC0) |
| 28 | { |
| 29 | Name (_HID, EISAID ("PNP0C09")) |
| 30 | Name (_UID, 1) |
Duncan Laurie | 045222f | 2013-05-21 07:49:11 -0700 | [diff] [blame] | 31 | Name (_GPE, EC_SCI_GPI) |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 32 | Name (TOFS, EC_TEMP_SENSOR_OFFSET) |
Duncan Laurie | 433432b | 2013-06-03 10:38:22 -0700 | [diff] [blame] | 33 | Name (TNCA, EC_TEMP_SENSOR_NOT_CALIBRATED) |
| 34 | Name (TNOP, EC_TEMP_SENSOR_NOT_POWERED) |
| 35 | Name (TBAD, EC_TEMP_SENSOR_ERROR) |
| 36 | Name (TNPR, EC_TEMP_SENSOR_NOT_PRESENT) |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 37 | Name (DWRN, 15) // Battery capacity warning at 15% |
| 38 | Name (DLOW, 10) // Battery capacity low at 10% |
| 39 | |
Shawn Nematbakhsh | 37b7a66 | 2015-03-24 11:07:51 -0700 | [diff] [blame] | 40 | OperationRegion (ERAM, EmbeddedControl, 0x00, EC_ACPI_MEM_MAPPED_BEGIN) |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 41 | Field (ERAM, ByteAcc, Lock, Preserve) |
| 42 | { |
| 43 | Offset (0x00), |
| 44 | RAMV, 8, // EC RAM Version |
| 45 | TSTB, 8, // Test Byte |
| 46 | TSTC, 8, // Complement of Test Byte |
| 47 | KBLV, 8, // Keyboard Backlight |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 48 | FAND, 8, // Set Fan Duty Cycle |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 49 | PATI, 8, // Programmable Auxiliary Trip Sensor ID |
| 50 | PATT, 8, // Programmable Auxiliary Trip Threshold |
| 51 | PATC, 8, // Programmable Auxiliary Trip Commit |
Duncan Laurie | e6b280e | 2014-02-10 16:21:05 -0800 | [diff] [blame] | 52 | CHGL, 8, // Charger Current Limit |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 53 | } |
| 54 | |
Shawn Nematbakhsh | 37b7a66 | 2015-03-24 11:07:51 -0700 | [diff] [blame] | 55 | #if CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP |
| 56 | OperationRegion (EMEM, EmbeddedControl, |
| 57 | EC_ACPI_MEM_MAPPED_BEGIN, EC_ACPI_MEM_MAPPED_SIZE) |
| 58 | Field (EMEM, ByteAcc, Lock, Preserve) |
| 59 | #else |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 60 | OperationRegion (EMEM, SystemIO, EC_LPC_ADDR_MEMMAP, EC_MEMMAP_SIZE) |
| 61 | Field (EMEM, ByteAcc, NoLock, Preserve) |
Shawn Nematbakhsh | 37b7a66 | 2015-03-24 11:07:51 -0700 | [diff] [blame] | 62 | #endif |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 63 | { |
Shawn Nematbakhsh | 37b7a66 | 2015-03-24 11:07:51 -0700 | [diff] [blame] | 64 | #include "emem.asl" |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | Method (TINS, 1, Serialized) |
| 68 | { |
| 69 | Switch (ToInteger (Arg0)) |
| 70 | { |
| 71 | Case (0) { Return (TIN0) } |
| 72 | Case (1) { Return (TIN1) } |
| 73 | Case (2) { Return (TIN2) } |
| 74 | Case (3) { Return (TIN3) } |
| 75 | Case (4) { Return (TIN4) } |
| 76 | Case (5) { Return (TIN5) } |
| 77 | Case (6) { Return (TIN6) } |
| 78 | Case (7) { Return (TIN7) } |
| 79 | Case (8) { Return (TIN8) } |
| 80 | Case (9) { Return (TIN9) } |
| 81 | Default { Return (TIN0) } |
| 82 | } |
| 83 | } |
| 84 | |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 85 | Method (_CRS, 0, Serialized) |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 86 | { |
| 87 | Name (ECMD, ResourceTemplate() |
| 88 | { |
| 89 | IO (Decode16, |
| 90 | EC_LPC_ADDR_ACPI_DATA, |
| 91 | EC_LPC_ADDR_ACPI_DATA, |
| 92 | 0, 1) |
| 93 | IO (Decode16, |
| 94 | EC_LPC_ADDR_ACPI_CMD, |
| 95 | EC_LPC_ADDR_ACPI_CMD, |
| 96 | 0, 1) |
| 97 | }) |
| 98 | Return (ECMD) |
| 99 | } |
| 100 | |
| 101 | Method (_REG, 2, NotSerialized) |
| 102 | { |
| 103 | // Initialize AC power state |
| 104 | Store (ACEX, \PWRS) |
| 105 | |
| 106 | // Initialize LID switch state |
| 107 | Store (LIDS, \LIDS) |
| 108 | } |
| 109 | |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 110 | /* Read requested temperature and check against EC error values */ |
| 111 | Method (TSRD, 1, Serialized) |
| 112 | { |
| 113 | Store (\_SB.PCI0.LPCB.EC0.TINS (Arg0), Local0) |
| 114 | |
| 115 | /* Check for sensor not calibrated */ |
| 116 | If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNCA)) { |
| 117 | Return (Zero) |
| 118 | } |
| 119 | |
| 120 | /* Check for sensor not present */ |
| 121 | If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNPR)) { |
| 122 | Return (Zero) |
| 123 | } |
| 124 | |
| 125 | /* Check for sensor not powered */ |
| 126 | If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNOP)) { |
| 127 | Return (Zero) |
| 128 | } |
| 129 | |
| 130 | /* Check for sensor bad reading */ |
| 131 | If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TBAD)) { |
| 132 | Return (Zero) |
| 133 | } |
| 134 | |
| 135 | /* Adjust by offset to get Kelvin */ |
| 136 | Add (\_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0) |
| 137 | |
| 138 | /* Convert to 1/10 Kelvin */ |
| 139 | Multiply (Local0, 10, Local0) |
| 140 | |
| 141 | Return (Local0) |
| 142 | } |
| 143 | |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 144 | // Lid Closed Event |
| 145 | Method (_Q01, 0, NotSerialized) |
| 146 | { |
| 147 | Store ("EC: LID CLOSE", Debug) |
| 148 | Store (LIDS, \LIDS) |
| 149 | Notify (\_SB.LID0, 0x80) |
| 150 | } |
| 151 | |
| 152 | // Lid Open Event |
| 153 | Method (_Q02, 0, NotSerialized) |
| 154 | { |
| 155 | Store ("EC: LID OPEN", Debug) |
| 156 | Store (LIDS, \LIDS) |
| 157 | Notify (\_SB.LID0, 0x80) |
| 158 | } |
| 159 | |
| 160 | // Power Button |
| 161 | Method (_Q03, 0, NotSerialized) |
| 162 | { |
| 163 | Store ("EC: POWER BUTTON", Debug) |
| 164 | Notify (\_SB.PWRB, 0x80) |
| 165 | } |
| 166 | |
| 167 | // AC Connected |
| 168 | Method (_Q04, 0, NotSerialized) |
| 169 | { |
| 170 | Store ("EC: AC CONNECTED", Debug) |
| 171 | Store (ACEX, \PWRS) |
| 172 | Notify (AC, 0x80) |
Duncan Laurie | 3f1500f | 2014-03-06 08:37:49 -0800 | [diff] [blame] | 173 | If (CondRefOf (\_SB.DPTF.TCHG)) { |
| 174 | Notify (\_SB.DPTF.TCHG, 0x80) |
| 175 | } |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 176 | \PNOT () |
| 177 | } |
| 178 | |
| 179 | // AC Disconnected |
| 180 | Method (_Q05, 0, NotSerialized) |
| 181 | { |
| 182 | Store ("EC: AC DISCONNECTED", Debug) |
| 183 | Store (ACEX, \PWRS) |
| 184 | Notify (AC, 0x80) |
Duncan Laurie | 3f1500f | 2014-03-06 08:37:49 -0800 | [diff] [blame] | 185 | If (CondRefOf (\_SB.DPTF.TCHG)) { |
| 186 | Notify (\_SB.DPTF.TCHG, 0x80) |
| 187 | } |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 188 | \PNOT () |
| 189 | } |
| 190 | |
| 191 | // Battery Low Event |
| 192 | Method (_Q06, 0, NotSerialized) |
| 193 | { |
| 194 | Store ("EC: BATTERY LOW", Debug) |
| 195 | Notify (BAT0, 0x80) |
| 196 | } |
| 197 | |
| 198 | // Battery Critical Event |
| 199 | Method (_Q07, 0, NotSerialized) |
| 200 | { |
| 201 | Store ("EC: BATTERY CRITICAL", Debug) |
| 202 | Notify (BAT0, 0x80) |
| 203 | } |
| 204 | |
| 205 | // Battery Info Event |
| 206 | Method (_Q08, 0, NotSerialized) |
| 207 | { |
| 208 | Store ("EC: BATTERY INFO", Debug) |
| 209 | Notify (BAT0, 0x81) |
| 210 | } |
| 211 | |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 212 | // Thermal Overload Event |
| 213 | Method (_Q0A, 0, NotSerialized) |
| 214 | { |
| 215 | Store ("EC: THERMAL OVERLOAD", Debug) |
| 216 | Notify (\_TZ, 0x80) |
| 217 | } |
| 218 | |
| 219 | // Thermal Event |
| 220 | Method (_Q0B, 0, NotSerialized) |
| 221 | { |
| 222 | Store ("EC: THERMAL", Debug) |
| 223 | Notify (\_TZ, 0x80) |
| 224 | } |
| 225 | |
| 226 | // USB Charger |
| 227 | Method (_Q0C, 0, NotSerialized) |
| 228 | { |
| 229 | Store ("EC: USB CHARGER", Debug) |
| 230 | } |
| 231 | |
| 232 | // Key Pressed |
| 233 | Method (_Q0D, 0, NotSerialized) |
| 234 | { |
| 235 | Store ("EC: KEY PRESSED", Debug) |
| 236 | } |
| 237 | |
Duncan Laurie | 18d9899b | 2013-08-28 09:54:04 -0700 | [diff] [blame] | 238 | // Thermal Shutdown Imminent |
| 239 | Method (_Q10, 0, NotSerialized) |
| 240 | { |
| 241 | Store ("EC: THERMAL SHUTDOWN", Debug) |
| 242 | Notify (\_TZ, 0x80) |
| 243 | } |
| 244 | |
| 245 | // Battery Shutdown Imminent |
| 246 | Method (_Q11, 0, NotSerialized) |
| 247 | { |
| 248 | Store ("EC: BATTERY SHUTDOWN", Debug) |
| 249 | Notify (BAT0, 0x80) |
| 250 | } |
| 251 | |
Duncan Laurie | d338b46 | 2013-07-31 15:30:41 -0700 | [diff] [blame] | 252 | // Throttle Start |
| 253 | Method (_Q12, 0, NotSerialized) |
| 254 | { |
| 255 | Store ("EC: THROTTLE START", Debug) |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 256 | If (CondRefOf (\_TZ.THRT)) { |
Duncan Laurie | d338b46 | 2013-07-31 15:30:41 -0700 | [diff] [blame] | 257 | \_TZ.THRT (1) |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | // Throttle Stop |
| 262 | Method (_Q13, 0, NotSerialized) |
| 263 | { |
| 264 | Store ("EC: THROTTLE STOP", Debug) |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 265 | If (CondRefOf (\_TZ.THRT)) { |
Duncan Laurie | d338b46 | 2013-07-31 15:30:41 -0700 | [diff] [blame] | 266 | \_TZ.THRT (0) |
| 267 | } |
| 268 | } |
| 269 | |
Shawn Nematbakhsh | 98cc94c | 2014-08-28 11:33:41 -0700 | [diff] [blame] | 270 | #ifdef EC_ENABLE_PD_MCU_DEVICE |
| 271 | // PD event |
| 272 | Method (_Q16, 0, NotSerialized) |
| 273 | { |
| 274 | Store ("EC: GOT PD EVENT", Debug) |
| 275 | Notify (ECPD, 0x80) |
| 276 | } |
| 277 | #endif |
| 278 | |
Duncan Laurie | d840118 | 2014-09-29 08:32:19 -0700 | [diff] [blame] | 279 | // Battery Status |
| 280 | Method (_Q17, 0, NotSerialized) |
| 281 | { |
| 282 | Store ("EC: BATTERY STATUS", Debug) |
| 283 | Notify (BAT0, 0x80) |
| 284 | } |
| 285 | |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 286 | /* |
| 287 | * Dynamic Platform Thermal Framework support |
| 288 | */ |
| 289 | |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 290 | /* Mutex for EC PAT interface */ |
| 291 | Mutex (PATM, 1) |
| 292 | |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 293 | /* |
| 294 | * Set Aux Trip Point 0 |
| 295 | * Arg0 = Temp Sensor ID |
| 296 | * Arg1 = Value to set |
| 297 | */ |
| 298 | Method (PAT0, 2, Serialized) |
| 299 | { |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 300 | If (Acquire (^PATM, 1000)) { |
| 301 | Return (0) |
| 302 | } |
| 303 | |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 304 | /* Set sensor ID */ |
| 305 | Store (ToInteger (Arg0), ^PATI) |
| 306 | |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 307 | /* Temperature is passed in 1/10 Kelvin */ |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 308 | Divide (ToInteger (Arg1), 10, , Local1) |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 309 | |
| 310 | /* Adjust by EC temperature offset */ |
| 311 | Subtract (Local1, ^TOFS, ^PATT) |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 312 | |
| 313 | /* Set commit value with SELECT=0 and ENABLE=1 */ |
| 314 | Store (0x02, ^PATC) |
| 315 | |
| 316 | Release (^PATM) |
| 317 | Return (1) |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 318 | } |
| 319 | |
| 320 | /* |
| 321 | * Set Aux Trip Point 1 |
| 322 | * Arg0 = Temp Sensor ID |
| 323 | * Arg1 = Value to set |
| 324 | */ |
| 325 | Method (PAT1, 2, Serialized) |
| 326 | { |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 327 | If (Acquire (^PATM, 1000)) { |
| 328 | Return (0) |
| 329 | } |
| 330 | |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 331 | /* Set sensor ID */ |
| 332 | Store (ToInteger (Arg0), ^PATI) |
| 333 | |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 334 | /* Temperature is passed in 1/10 Kelvin */ |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 335 | Divide (ToInteger (Arg1), 10, , Local1) |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 336 | |
| 337 | /* Adjust by EC temperature offset */ |
| 338 | Subtract (Local1, ^TOFS, ^PATT) |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 339 | |
| 340 | /* Set commit value with SELECT=1 and ENABLE=1 */ |
| 341 | Store (0x03, ^PATC) |
| 342 | |
| 343 | Release (^PATM) |
| 344 | Return (1) |
| 345 | } |
| 346 | |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 347 | /* Disable Aux Trip Points |
| 348 | * Arg0 = Temp Sensor ID |
| 349 | */ |
| 350 | Method (PATD, 1, Serialized) |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 351 | { |
| 352 | If (Acquire (^PATM, 1000)) { |
| 353 | Return (0) |
| 354 | } |
| 355 | |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 356 | Store (ToInteger (Arg0), ^PATI) |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 357 | Store (0x00, ^PATT) |
| 358 | |
| 359 | /* Disable PAT0 */ |
| 360 | Store (0x00, ^PATC) |
| 361 | |
| 362 | /* Disable PAT1 */ |
| 363 | Store (0x01, ^PATC) |
| 364 | |
| 365 | Release (^PATM) |
| 366 | Return (1) |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 367 | } |
| 368 | |
| 369 | /* |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 370 | * Thermal Threshold Event |
Duncan Laurie | e6b280e | 2014-02-10 16:21:05 -0800 | [diff] [blame] | 371 | */ |
Duncan Laurie | 8be6759 | 2014-01-09 10:01:05 -0800 | [diff] [blame] | 372 | Method (_Q09, 0, NotSerialized) |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 373 | { |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 374 | If (Acquire (^PATM, 1000)) { |
| 375 | Return () |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 376 | } |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 377 | |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 378 | /* Read sensor ID for event */ |
| 379 | Store (^PATI, Local0) |
| 380 | |
| 381 | /* When sensor ID returns 0xFF then no more events */ |
| 382 | While (LNotEqual (Local0, EC_TEMP_SENSOR_NOT_PRESENT)) |
| 383 | { |
Duncan Laurie | 20373c0 | 2015-09-22 09:40:37 -0700 | [diff] [blame] | 384 | If (CondRefOf (\_SB.DPTF.TEVT)) { |
Aaron Durbin | b3ce658 | 2014-05-13 09:23:10 -0500 | [diff] [blame] | 385 | \_SB.DPTF.TEVT (Local0) |
| 386 | } |
| 387 | |
Duncan Laurie | 93e2444 | 2014-01-06 12:30:52 -0800 | [diff] [blame] | 388 | /* Keep reaading sensor ID for event */ |
| 389 | Store (^PATI, Local0) |
| 390 | } |
| 391 | |
| 392 | Release (^PATM) |
Duncan Laurie | ad8d913 | 2013-12-10 07:41:33 -0800 | [diff] [blame] | 393 | } |
| 394 | |
Duncan Laurie | e6b280e | 2014-02-10 16:21:05 -0800 | [diff] [blame] | 395 | /* |
| 396 | * Set Charger Current Limit |
| 397 | * Arg0 = Current Limit in 64mA steps |
| 398 | */ |
| 399 | Method (CHGS, 1, Serialized) |
| 400 | { |
| 401 | Store (ToInteger (Arg0), ^CHGL) |
| 402 | } |
| 403 | |
| 404 | /* |
| 405 | * Disable Charger Current Limit |
| 406 | */ |
| 407 | Method (CHGD, 0, Serialized) |
| 408 | { |
| 409 | Store (0xFF, ^CHGL) |
| 410 | } |
| 411 | |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 412 | #include "ac.asl" |
| 413 | #include "battery.asl" |
Duncan Laurie | 612163eb | 2014-06-13 10:35:22 -0700 | [diff] [blame] | 414 | |
| 415 | #ifdef EC_ENABLE_ALS_DEVICE |
| 416 | #include "als.asl" |
| 417 | #endif |
Shawn Nematbakhsh | 98cc94c | 2014-08-28 11:33:41 -0700 | [diff] [blame] | 418 | |
Duncan Laurie | ef549a0 | 2015-09-01 09:47:55 -0700 | [diff] [blame] | 419 | #ifdef EC_ENABLE_KEYBOARD_BACKLIGHT |
| 420 | #include "keyboard_backlight.asl" |
| 421 | #endif |
| 422 | |
Shawn Nematbakhsh | 98cc94c | 2014-08-28 11:33:41 -0700 | [diff] [blame] | 423 | #ifdef EC_ENABLE_PD_MCU_DEVICE |
| 424 | #include "pd.asl" |
| 425 | #endif |
Stefan Reinauer | d6682e8 | 2013-02-21 15:39:35 -0800 | [diff] [blame] | 426 | } |