diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 4545669cb9735a..5879487c520d65 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -92,6 +92,8 @@ static void update_pm_runtime_accounting(struct device *dev) static void __update_runtime_status(struct device *dev, enum rpm_status status) { + dev_info(dev, "%s status %d\n", __func__, status); + dump_stack(); update_pm_runtime_accounting(dev); dev->power.runtime_status = status; } @@ -1307,6 +1309,9 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status) dev_err(dev, "runtime PM trying to activate child device %s but parent (%s) is not active\n", dev_name(dev), dev_name(parent)); + dev_err(dev, " status %d, parent runtime_status %d\n", + status, parent->power.runtime_status); + dump_stack(); error = -EBUSY; } else if (dev->power.runtime_status == RPM_SUSPENDED) { atomic_inc(&parent->power.child_count); diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c index af53cbcc7bf2dd..602442d3c0156d 100644 --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c @@ -1213,9 +1213,12 @@ int rt711_init(struct device *dev, struct regmap *sdw_regmap, int rt711_io_init(struct device *dev, struct sdw_slave *slave) { struct rt711_priv *rt711 = dev_get_drvdata(dev); + struct device *parent = dev->parent; rt711->disable_irq = false; + dev_info(dev, "bard: %s start hw_init %d first_hw_init %d parent %s rumtime_status %d\n", + __func__, rt711->hw_init, rt711->first_hw_init, dev_name(parent), parent->power.runtime_status); if (rt711->hw_init) return 0; @@ -1228,6 +1231,7 @@ int rt711_io_init(struct device *dev, struct sdw_slave *slave) * PM runtime is only enabled when a Slave reports as Attached */ if (!rt711->first_hw_init) { + /* set autosuspend parameters */ pm_runtime_set_autosuspend_delay(&slave->dev, 3000); pm_runtime_use_autosuspend(&slave->dev); diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index ff25718ff2e887..d8387111f3407a 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -1234,6 +1234,8 @@ int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd, for_each_rtd_components(rtd, i, component) { int ret = pm_runtime_get_sync(component->dev); + dev_info(component->dev, "bard: %s i %d called pm_runtime_get_sync ret %d\n", + __func__, i, ret); if (ret < 0 && ret != -EACCES) { pm_runtime_put_noidle(component->dev); return soc_component_ret(component, ret);