Repository navigation
fix(linux-mt6858): give the STK3A5X its own illuminance scale (r25) - #105
Open
patrickjquinn wants to merge 1 commit into
Open
patrickjquinn wants to merge 1 commit into
patrickjquinn wants to merge 1 commit into
Conversation
The Jolla's ambient light sensor read 65535 on every sample, so auto-brightness acted on a saturated input. The STK3A5X counts in 11.84 ms frames and averages longer integrations, so the 64x gain and 94.72 ms programmed for the STK3310's scale table saturated in room light, and the table's 0.1 lux a count was wrong for this part. r25 adds 0291 (jp2601/devfix-r25): 1x gain, 94.72 ms, 0.1375 lux a count from Sensortek's stk3a5x conversion, and no ALS integration time under 11.84 ms. Checked on the Jolla with the module built from this source swapped in: 2605 counts (358 lux) in daylight, 41657 at 16x for the same light, 130 counts (18 lux) after dusk, never 65535.
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jolla e2e 2026-11-28, P2 "ALS":
in_illuminance_rawread 65535 on every sample, so auto-brightness acted on a saturated input.Root cause. The STK3A5X counts in 11.84 ms frames and averages longer integrations (measured at 1x gain: counts double per step up to 11.84 ms, then stay at ~3250 from 11.84 ms to 757 ms). The driver programmed 64x gain and 94.72 ms for the STK3310's scale table, so room light saturated, and that table's 0.1 lux/count does not describe this part.
Fix. Kernel patch 0291 (jp2601/devfix-r25): a STK3A5X scale table (0.1375 lux/count at 1x and >=11.84 ms, from Sensortek's own stk3a5x driver: 1.1 lux/count at 4x and 370 us), 1x gain and 94.72 ms at probe, and ALS integration times under 11.84 ms refused. linux-mt6858 r25.
On the phone (module built from this source swapped in on r24): 2605 counts = 358 lux in daylight; 41657 at 16x for the same light (also 358 lux); 130 counts = 18 lux after dusk; never 65535. Proximity unchanged. checkpatch clean apart from the series' missing Signed-off-by; W=1 build clean.
The full r25 package build could not finish on this host (disk full); the patch applies in the package series (the build got past
prepareand compiled for 20 min).🤖 Generated with Claude Code
https://claude.ai/code/session_01BrjN1gf1Fu2w5MqXBmEowh