lkml.org 
[lkml]   [2019]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 34/40] soundwire: intel: ignore disabled links for suspend/resume
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:

Please add explanation why..

> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> drivers/soundwire/intel.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
> index 1477c35f616f..a976480d6f36 100644
> --- a/drivers/soundwire/intel.c
> +++ b/drivers/soundwire/intel.c
> @@ -1161,6 +1161,12 @@ static int intel_suspend(struct device *dev)
>
> sdw = dev_get_drvdata(dev);
>
> + if (sdw->cdns.bus.prop.hw_disabled) {
> + dev_dbg(dev, "SoundWire master %d is disabled, ignoring\n",
> + sdw->cdns.bus.link_id);
> + return 0;
> + }
> +
> ret = intel_link_power_down(sdw);
> if (ret) {
> dev_err(dev, "Link power down failed: %d", ret);
> @@ -1179,6 +1185,12 @@ static int intel_resume(struct device *dev)
>
> sdw = dev_get_drvdata(dev);
>
> + if (sdw->cdns.bus.prop.hw_disabled) {
> + dev_dbg(dev, "SoundWire master %d is disabled, ignoring\n",
> + sdw->cdns.bus.link_id);
> + return 0;
> + }
> +
> ret = intel_init(sdw);
> if (ret) {
> dev_err(dev, "%s failed: %d", __func__, ret);
> --
> 2.20.1

--
~Vinod

\
 
 \ /
  Last update: 2019-08-02 19:33    [W:0.633 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site