Skip to content

usb: typec: tipd: sleep: drop the S3-refusal switch and the SSPS limit tunable - #2628

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/m5-t6050-tipd-sleep-no-switches
Nov 21, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/m5-t6050-tipd-sleep-no-switches

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Follow-up to #2622 for the project rule that merged code picks its behaviour itself, with no runtime switch. This covers two older tipd parameters, from 475b7ad.

What changes

  • tps6598x_core.sleep_s3_refuse (default on) is removed. A port controller that doesn't take S3 under the sleep's rules now always refuses the sleep. The one sleep that went on after such a failure ended in a reset at the commit.
  • tps6598x_core.sleep_ssps_ms (default 1000, clamped 1000-5000) is removed.
    • The SSPS wait already ends on the controller's own signal: CMD1 is read at intervals until the command ends, then the power state is read back. In macOS's J714s traces that's 7-12 ms.
    • The limit is only the fallback. It becomes a constant at the old default, 1000 ms, the same as every other command in this driver.
  • Behaviour at the defaults is unchanged. The refusal's comment moves to where the refusal happens.

Testing: the M5 gates ran at these defaults: 8 of 8 deep sleeps on the pre-review heads of #2597-#2601, and 5 of 5 on d1d26ab. No S3 was refused, and every SSPS ended within its first reads.

🤖 Generated with Claude Code

…t tunable

Two module parameters of the sleep's port-controller handling (the
T6050 boards and the J813/J815) were runtime switches:

- sleep_s3_refuse (default on): a controller that does not take system
  power state S3 refuses the sleep, or, switched off, lets it go on.
  The one sleep that went on after such a failure ended in a reset at
  the commit. The refusal is now unconditional.
- sleep_ssps_ms (default 1000, clamped to 1000-5000): the limit of an
  SN201202x's system power state command under the sleep's rules. The
  wait already ends on the controller's own signal: the command
  register read at intervals until the command has ended, then the
  power state read back, within the first few reads (7-12 ms in
  macOS's traces of the J714s). The limit is only the fallback, so it
  becomes a constant at the old default, 1000 ms, this driver's
  default command limit.

The defaults' behaviour is unchanged; the refusal's comment moves to
where it happens, and the J813/J815 sleep DTS comment that named the
parameter names cd321x_prepare() instead.

Signed-off-by: Diljit Singh <hey@djdev.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DjDeveloperr DjDeveloperr changed the title usb: typec: tipd: T6050 sleep: drop the S3-refusal switch and the SSPS limit tunable usb: typec: tipd: sleep: drop the S3-refusal switch and the SSPS limit tunable Nov 21, 2026
@DjDeveloperr
DjDeveloperr force-pushed the djdev/m5-t6050-tipd-sleep-no-switches branch from 70fd745 to e253498 Compare November 21, 2026 00:05
@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks right: both paths keep their defaults (refuse on a failed S3 under the sleep's rules, a 1000 ms limit), and the refusal's comment now sits where the refusal happens.

Nit: the new comment calls 1000 ms "this driver's default command limit", but the same tps6598x_exec_cmd_gap() call still passes 5000 ms when the sleep's rules don't apply (cd321x_switch_power_state()). Saying "the limit used under the sleep's rules" would avoid suggesting the two are the same.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr merged commit 5b596e6 into integration/aurora Nov 21, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the djdev/m5-t6050-tipd-sleep-no-switches branch November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants