Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drivers/soundwire/intel.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ static inline int sdw_intel_start_bus_after_clock_stop(struct sdw_intel *sdw)
return -ENOTSUPP;
}

static inline int sdw_intel_stop_bus(struct sdw_intel *sdw, bool clock_stop)
static inline int sdw_intel_stop_bus(struct sdw_intel *sdw, bool clock_stop, bool wake_enable)
{
if (SDW_INTEL_CHECK_OPS(sdw, stop_bus))
return SDW_INTEL_OPS(sdw, stop_bus)(sdw, clock_stop);
return SDW_INTEL_OPS(sdw, stop_bus)(sdw, clock_stop, wake_enable);
return -ENOTSUPP;
}

Expand Down Expand Up @@ -261,7 +261,7 @@ int intel_start_bus(struct sdw_intel *sdw);
int intel_start_bus_after_reset(struct sdw_intel *sdw);
void intel_check_clock_stop(struct sdw_intel *sdw);
int intel_start_bus_after_clock_stop(struct sdw_intel *sdw);
int intel_stop_bus(struct sdw_intel *sdw, bool clock_stop);
int intel_stop_bus(struct sdw_intel *sdw, bool clock_stop, bool wake_enable);

/* common bank switch routines */
int intel_pre_bank_switch(struct sdw_intel *sdw);
Expand Down
8 changes: 4 additions & 4 deletions drivers/soundwire/intel_auxdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ static int __maybe_unused intel_suspend(struct device *dev)
return 0;
}

/* No need to keep the SoundWire clock active in system suspend */
ret = sdw_intel_stop_bus(sdw, true);
/* Perform clock stop with proper mode and keep the bus unwakeable in system suspend. */
ret = sdw_intel_stop_bus(sdw, true, false);
if (ret < 0) {
dev_err(dev, "%s: cannot stop bus: %d\n", __func__, ret);
return ret;
Expand All @@ -697,14 +697,14 @@ static int __maybe_unused intel_suspend_runtime(struct device *dev)
clock_stop_quirks = sdw->link_res->clock_stop_quirks;

if (clock_stop_quirks & SDW_INTEL_CLK_STOP_TEARDOWN) {
ret = sdw_intel_stop_bus(sdw, false);
ret = sdw_intel_stop_bus(sdw, false, false);
if (ret < 0) {
dev_err(dev, "%s: cannot stop bus during teardown: %d\n",
__func__, ret);
return ret;
}
} else if (clock_stop_quirks & SDW_INTEL_CLK_STOP_BUS_RESET || !clock_stop_quirks) {
ret = sdw_intel_stop_bus(sdw, true);
ret = sdw_intel_stop_bus(sdw, true, true);
if (ret < 0) {
dev_err(dev, "%s: cannot stop bus during clock_stop: %d\n",
__func__, ret);
Expand Down
5 changes: 1 addition & 4 deletions drivers/soundwire/intel_bus_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,10 @@ int intel_start_bus_after_clock_stop(struct sdw_intel *sdw)
return 0;
}

int intel_stop_bus(struct sdw_intel *sdw, bool clock_stop)
int intel_stop_bus(struct sdw_intel *sdw, bool clock_stop, bool wake_enable)
{
struct device *dev = sdw->cdns.dev;
struct sdw_cdns *cdns = &sdw->cdns;
bool wake_enable = false;
int ret;

cancel_delayed_work_sync(&cdns->attach_dwork);
Expand All @@ -215,8 +214,6 @@ int intel_stop_bus(struct sdw_intel *sdw, bool clock_stop)
ret = sdw_cdns_clock_stop(cdns, true);
if (ret < 0)
dev_err(dev, "%s: cannot stop clock: %d\n", __func__, ret);
else
wake_enable = true;
}

ret = sdw_cdns_enable_interrupt(cdns, false);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/soundwire/sdw_intel.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ struct sdw_intel_hw_ops {
int (*start_bus)(struct sdw_intel *sdw);
int (*start_bus_after_reset)(struct sdw_intel *sdw);
int (*start_bus_after_clock_stop)(struct sdw_intel *sdw);
int (*stop_bus)(struct sdw_intel *sdw, bool clock_stop);
int (*stop_bus)(struct sdw_intel *sdw, bool clock_stop, bool wake_enable);

int (*link_power_up)(struct sdw_intel *sdw);
int (*link_power_down)(struct sdw_intel *sdw);
Expand Down
Loading