Skip to content

fix(kernel): let the gamepad rail drop in sleep on the Odin 2 Portal - #98

Open
TheWeaklessOne wants to merge 1 commit into
hashtagbasit:mainfrom
TheWeaklessOne:fix/sm8550-htr3212-release-supply
Open

TheWeaklessOne wants to merge 1 commit into
hashtagbasit:mainfrom
TheWeaklessOne:fix/sm8550-htr3212-release-supply

Conversation

@TheWeaklessOne

Copy link
Copy Markdown

On the Odin 2 Portal the gamepad MCU stayed powered through system sleep. The two HTR3212 stick-LED controllers share vdd_mcu_3v3 with it, and while 0029 makes rsinput drop its vote in suspend, each controller holds its own vote for as long as it is bound. The rail never reached zero users, so it stayed on with the MCU held in reset behind it.

Change

Kernel patch (0075 for sm8550, 0088 for sm8550-74, same content): htr3212_suspend() releases the supply after pulling SDB low, and htr3212_resume() takes it back before raising SDB. Resume already re-initialises the chip and restores every LED (0071), so losing the register state costs nothing.

Tested on an Odin 2 Portal (7.2.8, sm8550 set plus this patch)

  • A regulator trace across a 60 s RTC sleep shows vdd_mcu_3v3 disabled at suspend and enabled again at resume. Before the patch it stayed enabled with three users.
  • Several short sleeps and a 3 h sleep resumed cleanly: rsinput reports "MCU parameters set successfully", no htr3212 errors, LED brightness restored. Gamepad and stick LEDs checked by hand after a wake.
  • Power, measured before writing the patch by unbinding all three consumers (rsinput and both htr3212) so the rail could drop: 25-minute RTC sleeps in rotated order used 17.5 mAh per cycle against 25.9 mAh with them bound, three cycles each, roughly 70 mW. Unbinding also skips the drivers' resume work, so the saving from the patch alone may be smaller. I don't have a clean long-sleep A/B yet; the fuel gauge reports in 0.01% steps, which makes short comparisons noisy.

Not tested: the sm8550-74 copy was not built or run on 7.4, and I have no Retroid or Thor to check those boards, where the controllers may sit on a rail with different consumers.

🤖 Generated with Claude Code

The stick-LED controllers kept vdd_mcu_3v3 on through s2idle, so the
gamepad MCU stayed powered even after rsinput let go of it. Release the
supply in htr3212 suspend and take it back on resume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added soc: sm8550 Affects devices with this SoC kernel Kernel changes labels Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Kernel changes soc: sm8550 Affects devices with this SoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant