Hello Vinod, On Thu, Aug 27, 2026 at 09:46:38PM +0530, Vinod Koul wrote: > On 13-08-26, 22:52, Sebastian Reichel wrote: > > Some PHY devices with multiple ports (e.g. USB3 and DP) require a reset > > if the configuration changes or cable orientation changes. This is a > > problem, as the consumer device will run into undefined behavior. > > > > With the new PHY notifier API introduced in this patch, the consumer > > driver can hook into reset events coming from a PHY device to handle the > > PHY going down gracefully. > > Hmmm how will phy get notified for these events. Typically there is a > separate hotplug mechanism to take care of cable changes. > > Looking at implementation of this, It seems to me there is checked on > power-on, so maybe notifier maynot be right one... ? With USB-C you have the TCPM (Type-C Port Manager), which will send notifications when the plug orientation changed or a different mux configuration is needed (both information are sourced from USB PD). You can see typec_switch_register() and typec_mux_register() registering handlers for these events. Effectively there is: 1. TCPM providing information about the hardware configuration 2. USB controller driver requesting the USB side (software request) 3. DP controller driver requesting the DP side (software request) These are combined into the desired PHY state. If the USB controller driver requested the PHY (happens during normal driver probe of dwc3) and then you plug a device into the USB-C port, which changes the mux configuration, the PHY needs to be restarted/reset. Accessing the USB controller while the PHY is restarted results in an SError. This part of the series will mitigate the problem. Greetings, -- Sebastian