uzbek-plus/logs/b10/b10b3/B10B4-HOOK-REVIEW.md
q 58dcb3d121 B10: battery charging — PM8916 LBC supervisor v4 (CHARGE/HOLD, FAULT safe clamp to 4.00 V) and persistent B10B-5 cache
- LBC supervisor v1..v4 (linux/patches/b10b3-lbc-supervisor-v3.patch + b10/b10b3/lbc-v3-to-v4-fault-clamp.diff):
  CHARGING 4.20 V/450 mA -> HOLD 4.05 V after 60 min CV -> battery -> new cycle on USB insert; FAULT = VDD_MAX 4.00 V clamp
- RAM tests C/B/D/D2/D3/D4 (safety timer only ends fast charge), B10B-4 actuator audit (VDD_MAX works, USB_SUSP does not),
  B10B-5 FAULT clamp regression, production run, warm reboot via PON reboot reason
- cache = B10B-5 c3732515 (HW EDL write, readback + full partition verify), class-A persistent validation
- test-only hooks/images are not part of the production kernel; images with the AP PSK are not published
2026-10-04 19:00:27 +03:00

22 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# B10B-4 TEST-ONLY actuator hook — build review (no board load)
Date: 2026-10-04. Kernel **7.2.7-aurora-b10b4-debug** (tree /home/q/aurora-kbuild/src-b10b4 = hardlink copy of src-b10b3 with only
`drivers/power/supply/pm8916_lbc.c` and `drivers/power/supply/Kconfig` replaced; build dir out-b10b4; `.config` = out-b10b3 + LOCALVERSION
"-aurora-b10b4-debug" + `CONFIG_CHARGER_PM8916_LBC_B10B4_DEBUG=y`). Diff: `b10/b10b3/lbc-v3-to-b10b4-debug.diff`. Build logs: build-b10b4-kernel-part1/2.log
(part 1 stopped by a harness time limit, part 2 rc=0 in 802 s; no warnings/errors).
- Test-only gating: new Kconfig bool CHARGER_PM8916_LBC_B10B4_DEBUG (default n, depends on CHARGER_PM8916_LBC && DEBUG_FS); all hook code and the
debugfs file are under `#ifdef`. Production .config (out-b10b3) has no such symbol; production object has 0 "B10B-4" strings.
- debugfs: `pm8916_lbc/b10b4`, mode **0200** (root write-only), `simple_open`, write-only fops; probe logs a dev_warn banner.
- Commands: exactly `susp 0|1` (USB block + 0x47 = 0x1347, bit0 only, `regmap_update_bits` mask BIT(0)), `vdd 0..8` (0x1040, `regmap_write`),
`ibat 0..4` (0x1044, `regmap_write`); one token + one numeric argument, extra/missing tokens, unknown command, out-of-range or non-numeric → -EINVAL
before any register access; length ≥ 32 → -EINVAL.
- Lock: `mutex_lock(&chg->supv_lock)` around read-old → write → readback (the same lock as `lbc_supv_work` and the constant_charge_current setter).
- regmap calls in `lbc_b10b4_write` (objdump): regmap_read ×3 call sites (old + readback), regmap_write ×1, regmap_update_bits_base ×1; dev_warn ×2.
- Supervisor/state machine v3 unchanged (diff touches only includes, the new hook block and the debugfs registration).
- Image `b10/b10b3/out-b4/aurora-b10b4.img` **eeff6820…** = kernel Image.gz 2c802f64 + DTB `msm8916-jz08-aurora-b10b4.dtb` 627d86be
(production b10b3 DTB, model string "B10B-4 actuator TEST" only) + B9C initramfs ac518e27 + cmdline 0fef41b2.
- Production artifacts verified bit-for-bit unchanged: `b10/b10b3/out` (7/7 incl. aurora-b10b3.img b7dc34e9, Image.gz 1164b1c7), cache candidate
`b10/b10b3/cache` (4/4 incl. 86869061), out-p (7/7), out-b10b3 Image.gz 1164b1c7; src-b10b3 pm8916_lbc.c == upstream + v3 patch, src-b10b3 Kconfig == upstream.
- Note: the Kconfig block was first inserted inside the CHARGER_PM8916_LBC help text; moved after it (help text only) — `make olddefconfig` leaves
.config unchanged, no rebuild needed.