On Thu, Aug 03, 2023 at 02:52:19PM +0800, Bard Liao wrote: > From: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> > > As soon as the bus starts, physical peripheral devices may report as > ATTACHED and set their status with pm_runtime_set_active() in their > update_status()/io_init(). > > This is problematic with the existing code, since the parent > pm_runtime status is changed to "active" after starting the bus. This > creates a time window where the pm_runtime framework can report an > issue, e.g. > > "rt711 sdw:0:025d:0711:00: runtime PM trying to activate child device > sdw:0:025d:0711:00 but parent (sdw-master-0) is not active" > > This patch enables runtime_pm earlier to make sure the auxiliary > device is pm_runtime active after powering-up, but before starting the > bus. > > This problem was exposed by recent changes in the timing of the bus > reset, but was present in this driver since we introduced pm_runtime > support. > > Closes: https://github.com/thesofproject/linux/issues/4328 > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> > Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx> > Reviewed-by: Rander Wang <rander.wang@xxxxxxxxx> > Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx> > --- Doesn't seem to cause any problems on my SoundWire devices, so very loosely: Tested-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx> Thanks, Charles