Repository navigation
[Joshua's agent] iio: aop_als: arm the VD6286 with the CT817 property sequence - #1929
joshuaswarren wants to merge 1 commit into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
|
[Joshua's agent] Hardware result on the 14-inch M5 Max MacBook Pro (comb4e image, this PR's arming sequence): FAIL.
Do not merge this PR as it is. A follow-up probe drops 0xe1 on the VD6286, re-arms the interval like a power-on, and requests the HID descriptor last. This PR gets updated after that boot result. |
|
[Joshua's agent] Boot result on the 14-inch M5 Max MacBook Pro (comb4y image): the ALS test did not run. The AOP firmware crashed during boot, before the arming sequence.
This PR stays unmerged. The next boot result goes here after the dcp-control crash is fixed. |
joshuaswarren: [Joshua's agent] iio: aop_als: arm the VD6286 with the CT817 property sequence
On the 14-inch M5 Max MacBook Pro (T6050) the VD6286 accepts the calibration and the report interval with status 0 and then sends no data report: every EPIC report on its endpoint after probe is the service announce, and every read of in_illuminance_input returns ENODATA. macOS runs this sensor with a batch interval of 1 and a verbosity of 6, the values the CT817 path already writes before its interval. Send that sequence for every sensor, after the calibration blob on the VD6286, so the zero to non-zero interval transition arms it.
eaa3076 to
05bf748
Compare
On the 14-inch M5 Max MacBook Pro (T6050) the ambient light sensor reports as a VD6286 ("Redbird") and takes the VD6286 path in
enable_als. That path sends the calibration blob and the report interval, and nothing else.What a debug build measured on the M5 Max, kernel 7.3.0:
handle_ipc, before any dispatch, logged every report on the ALS endpoint. The only one was the 0xc0 service announce. No data report (0xc4) arrived.in_illuminance_inputreturned ENODATA (31 of 31 over three minutes).So the sensor is never armed; the report parser never sees data.
macOS runs this sensor with a batch interval of 1 and a verbosity of 6 (from its IORegistry). Those are the values the CT817 path already writes before its interval, and the CT817 comment says why: the sensor accepts the zero to non-zero interval transition only after its batch and raw interval properties are written.
The change sends that sequence (verbosity, batch interval, raw interval, then interval) for every sensor, after the calibration blob on the VD6286. The MODE (0xd7) and 0xe4 properties stay out, as before.
Risk: the M4 Pro VD6286 now gets the same three writes before its interval. I have not run it on an M4 Pro.
Test plan (14-inch M5 Max MacBook Pro):
in_illuminance_inputandin_colortemp_inputfor 3 minutes: no ENODATA, and the lux value follows a light change (cover the sensor, then a lamp).Status: compile-checked (rustc 1.93, clang 22). Not yet booted. I will post the boot result here.
Validated on, and reach
Validated on: Measured on a 14-inch M5 Max MacBook Pro (K114c, T6050), kernel 7.3.0 debug build: calibration and interval properties returned 0, only the 0xc0 announce arrived, and 31 of 31 illuminance reads returned ENODATA. The fix itself: see the test plan in the body.
Applies beyond the M4: The change sends the CT817 property sequence for every sensor. The M4 Pro VD6286 now gets the same three writes before its interval; that was not run on an M4 Pro.
m tester run (omarchy-m-testing.org): feature rows Always-on processor (AOP: ambient light sensor, lid angle). The tester needs the hardware; no tester run is linked to this change.