mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Janne Grunau <j@jannau.net>
To: Jacob Procee <sn125164@gmail.com>
Cc: Sven Peter <sven@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tipd: cd321x: replay the plug on resume
Date: Tue, 17 Nov 2026 13:47:10 +0100	[thread overview]
Message-ID: <20261117124710.GA515128@robin.jannau.net> (raw)
In-Reply-To: <20261117131713.2db5294d@nixos-macbook>

On Tue, Nov 17, 2026 at 01:17:13PM +0100, Jacob Procee wrote:
> On Tue, 17 Nov 2026 13:03:03 +0100
> Sven Peter <sven@kernel.org> wrote:
> 
> > I suspect we're just missing the proper suspend/resume work in the PHY
> > itself to put it into a low power state. Or maybe we need to keep an
> > additional power domain enabled so that the PHY doesn't lose all state
> > and keeps working in a lower power mode.
> 
> Agreed, please drop this (and v2).
> 
> That second option is what happens with wakeup enabled: the dwc3 node
> and the ATC PHY share the atc*_usb pmgr domain, and it's only switched
> off in s2idle because xhci and the root hubs default to power/wakeup =
> disabled. With wakeup enabled on xhci-hcd.*.auto and usb* (Asahi 7.3.3,
> j314s), the domain stays on and a device left plugged in stays
> connected through s2idle without re-enumerating (no "xHC error in
> resume ... Reinit"). Asahi's pmgr marks these domains
> GENPD_FLAG_ACTIVE_WAKEUP; mainline's doesn't yet.

yes, the downstream tree has commit to set GENPD_FLAG_ACTIVE_WAKEUP for
all power-domains which are active at probe (boot) time.

> Wake from a USB keyboard still doesn't work: nothing calls
> enable_irq_wake() for the dwc3/xhci IRQ, and irq-apple-aic has neither
> irq_set_wake nor IRQCHIP_SKIP_SET_WAKE.

The interrupt controller (AIC) doesn't have functionality to configure
IRQs as wake up source so it should set IRQCHIP_SKIP_SET_WAKE. Does wake
from USB keyboard work with that changed?
You might also need to add "wakeup-source" to the dwc3 nodes.

Janne

      reply	other threads:[~2026-11-17 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:30 Jacob Procee
2026-11-17 11:08 ` Heikki Krogerus
2026-11-17 12:03   ` Sven Peter
2026-11-17 12:17     ` Jacob Procee
2026-11-17 12:47       ` Janne Grunau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117124710.GA515128@robin.jannau.net \
    --to=j@jannau.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sn125164@gmail.com \
    --cc=sven@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®