Handle active-low cover backlight and restore internal panel

This commit is contained in:
Luxferre committed 2026-11-11 07:57:38 +02:00
1 parent b389120328
commit d61f2848db
11 files changed
+412 -106

No files matched your search

+10 -6
View File
@@ -77,16 +77,20 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, `
**closed only** (`bananarchy-cover-idle`); never claim gpio13/23 or send cover SPI traffic while the flip is open,
gate initial activation on the main panel being DPMS-off, and always restore the mux on `LID OPEN`.
- The KaiOS 3.10 DTS gives both panels shared CS0, gpio110 D/C and one PWM backlight; gpio21 is TE and gpio23 is the
external reset. Keep the exact vendor external init firmware, the debugfs command replay, the gpio23 reset pulse,
`/run/bananarchy/cover-backlight` and the `bananarchy-display-power-sync` marker exemption. The legacy 8-bit/9-bit
userspace paths, `PROBE` and `bananarchy-cover-probe.sh` remain rollback/sign-off tooling. If the cover stays dark,
`SET mux_closed_level 0` switches gpio13 polarity at runtime.
external reset. The shared PWM is active-low for the cover and active-high for the main panel: duty 0 lights the
cover, duty 14 lights the internal panel. Keep the exact vendor external init firmware, the debugfs command replay,
the gpio23 reset pulse, `/run/bananarchy/cover-backlight` (`1` = cover lit, `0` = cover dark),
`kernel_power_sync_helper` and the `/run/bananarchy/cover-bl-force` nested-udev guard. On open, restore
gpio13 low, duty 14, `bl_power=0`, DPMS On and re-init the internal panel. The legacy 8-bit/9-bit userspace paths, `PROBE` and `bananarchy-cover-probe.sh` remain
rollback/sign-off tooling. `SET mux_closed_level 0` selects the internal panel, not the cover; use
`SET kernel_backlight_invert 0|1` only if a unit's backlight polarity differs.
- Keep the internal beatles panel at 25 MHz, `dc_gpio = -1` for the spidev fallback, external-panel firmware and
initramfs module lists, the Xorg `card0` pin, `bananarchy-cover-diagnose.sh`, and the
`scripts/test-cover-dt.py` / `scripts/test-cover-spidev.py` guards.
- The shipping cover backend is `backend = kernel`: keep `bananarchy-cover-dpms.sh reinit`, the gpio13 mux claim,
the 240x240 `/dev/fb0` damage rect, the 1 s repaint against Xorg, `scripts/test-cover-kernel.py`, and the
`spidev`/`fb`/`none` rollback backends.
the 240x240 `/dev/fb0` damage rect, the 1 s repaint against Xorg, `kernel_backlight_invert = 1`,
`kernel_backlight_level = 14`, `scripts/test-cover-kernel.py`, and the `spidev`/`fb`/`none` rollback backends.
The daemon must restore the internal panel on `LID OPEN` even after a stale high gpio13 survives a restart.
- Keep the 2720 Flip lid handling event-driven and instant: sticky hall state, immediate hall re-read on `EV_SW`
edges, 20 ms debounce, and synchronous lid-state/lock/backlight/DPMS writes in `bananarchy-lid.c`. Closing locks
the desktop; opening must keep the lock flag and wake to the passcode lockscreen, never auto-unlock. Every