Repository navigation
Conversation
The S2MPG10 alarm callback reads S2MPS14_REG_ST2 at offset 0x08.
On S2MPG10 that offset is an interrupt mask register; alarm 0's
pending bit is bit 2 of STATUS2 at offset 0x0d. The callback can
therefore report the mask bit as the pending alarm state.
Read S2MPG10_PMIC_STATUS2 for S2MPG10 and check the read result
before using the value. Leave the other PMIC paths unchanged.
Fixes: e64180846e7e ("rtc: s5m: add support for S2MPG10 RTC")
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/rtc/rtc-s2mpg10.c
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/include/linux/mfd/samsung/rtc-s2mpg10.h
Assisted-by: LLM
Signed-off-by: Gr-linkk <280405187+Gr-linkk@users.noreply.github.com>
Gr-linkk
marked this pull request as draft
October 31, 2026 02:59
Owner
|
Thank you, verified against Google's register header ( |
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.
The S2MPG10 alarm callback reads offset
0x08, an interrupt mask on this PMIC, instead of STATUS2 at0x0d. It can therefore report the mask bit as the alarm-pending state. Read STATUS2 bit 2 for S2MPG10 and return a read error before using the value; the other PMIC paths are unchanged.Google's GPL S2MPG10 register header and RTC header define the address and alarm bit.
The actual callback passes 1,550 host cases covering register values, read errors and unsupported devices. A separate 3,840-case comparison checks the other PMIC paths and opposing S2MPG10 mask/status values. These tests model register and IRQ activity. ARM64
W=1, strict checkpatch, merge and repository policy checks pass.Exact-head hardware evidence: on November 7, the kernel built from
c59065d8ba824d2bb559adea2d99cd381ee89b6ebooted on a Pixel 6 in a separately qualified rescue image and passed the 90-second boot check, firmware-memory coverage, guarded storage enumeration and metadata-preservation checks. The original images and native desktop were restored and verified afterward. This used a local device-tree/rescue packaging adaptation; it does not qualify the public device tree as a standalone phone installation. No PMIC/RTC provider or alarm operation was performed in that run.This remains a draft pending the requested awake alarm set/read/cancel test. The exact-branch test helper is prepared offline, including independent timeout supervision and cancellation after failure. Live execution is blocked on qualification of cancellation-only recovery after an uncertain alarm operation: a reset alone does not establish that the PMIC alarm is disabled.
/proc/driver/rtcwill supply the requested armed-alarm smoke evidence, but its alarm fields are cached by the RTC core. Independent hardware verification is required for the final disabled state. Alarm expiry/IRQ delivery, a live pending bit, suspend/wake and the unchanged S2MPG12 path have not been tested on this branch. Results from the broader integration kernel are not attributed to this exact-head test.