Commit fa90434
committed
Fix charging continuing above the max limit
Charge inhibition wrote only CH0C=0x01, which left the battery trickle
charging above the limit instead of bypassing it. Match the batt
reference: write CH0B and CH0C together (0x02 = inhibit) on pre-Tahoe
firmware, or CHTE on Tahoe firmware. SMCComm probes key capability once
and picks the right path, so both firmware families work.
All control paths (heat protection, charge-to-full, manual overrides,
auto limit) now route through SMCComm.disableCharging()/enableCharging().
With charging properly inhibited the adapter still powers the system, so
the battery is held at the limit rather than charged or discharged.
Update the README SMC-key table to match.1 parent 973a4d5 commit fa90434
3 files changed
Lines changed: 64 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | | - | |
| 329 | + | |
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
| |||
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
341 | | - | |
342 | | - | |
| 340 | + | |
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
| |||
350 | 348 | | |
351 | 349 | | |
352 | 350 | | |
353 | | - | |
354 | | - | |
| 351 | + | |
355 | 352 | | |
356 | 353 | | |
357 | 354 | | |
| |||
361 | 358 | | |
362 | 359 | | |
363 | 360 | | |
364 | | - | |
365 | | - | |
| 361 | + | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
| |||
389 | 385 | | |
390 | 386 | | |
391 | 387 | | |
392 | | - | |
| 388 | + | |
393 | 389 | | |
394 | | - | |
| 390 | + | |
395 | 391 | | |
396 | 392 | | |
397 | | - | |
398 | | - | |
| 393 | + | |
399 | 394 | | |
400 | 395 | | |
401 | 396 | | |
| |||
418 | 413 | | |
419 | 414 | | |
420 | 415 | | |
421 | | - | |
422 | | - | |
| 416 | + | |
423 | 417 | | |
424 | 418 | | |
425 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
193 | 246 | | |
194 | 247 | | |
195 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments