Skip to content
Closed
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_auxdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ int intel_link_process_wakeen_event(struct auxiliary_device *auxdev)
* PM calls
*/

static int intel_resume_child_device(struct device *dev, void *data)
int intel_resume_child_device(struct device *dev, void *data)
{
int ret;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
Expand All @@ -454,9 +454,9 @@ static int intel_resume_child_device(struct device *dev, void *data)
return 0;
}

ret = pm_request_resume(dev);
ret = pm_runtime_resume(dev);
if (ret < 0) {
dev_err(dev, "%s: pm_request_resume failed: %d\n", __func__, ret);
dev_err(dev, "%s: pm_runtime_resume failed: %d\n", __func__, ret);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repetition in commit message, it's pm_runtime_resume()

return ret;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/soundwire/intel_auxdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

int intel_link_startup(struct auxiliary_device *auxdev);
int intel_link_process_wakeen_event(struct auxiliary_device *auxdev);
int intel_resume_child_device(struct device *dev, void *data);

struct sdw_intel_link_dev {
struct auxiliary_device auxdev;
Expand Down
17 changes: 17 additions & 0 deletions drivers/soundwire/intel_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/pm_runtime.h>
#include <linux/soundwire/sdw_intel.h>
#include "cadence_master.h"
#include "bus.h"
#include "intel.h"
#include "intel_auxdevice.h"

Expand Down Expand Up @@ -363,6 +364,22 @@ void sdw_intel_exit(struct sdw_intel_ctx *ctx)
}
EXPORT_SYMBOL_NS(sdw_intel_exit, SOUNDWIRE_INTEL_INIT);

void sdw_intel_pre_exit(struct sdw_intel_ctx *ctx)
{
struct sdw_intel_link_res *link;

list_for_each_entry(link, &ctx->link_list, list) {
struct sdw_bus *bus = &link->cdns->bus;
int ret;

ret = device_for_each_child(bus->dev, NULL, intel_resume_child_device);
if (ret < 0)
dev_err(bus->dev, "%s: intel_resume_child_device failed: %d\n",
__func__, ret);
}
}
EXPORT_SYMBOL_NS(sdw_intel_pre_exit, SOUNDWIRE_INTEL_INIT);

Comment thread
plbossart marked this conversation as resolved.
void sdw_intel_process_wakeen_event(struct sdw_intel_ctx *ctx)
{
struct sdw_intel_link_dev *ldev;
Expand Down
1 change: 1 addition & 0 deletions include/linux/soundwire/sdw_intel.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ sdw_intel_probe(struct sdw_intel_res *res);
int sdw_intel_startup(struct sdw_intel_ctx *ctx);

void sdw_intel_exit(struct sdw_intel_ctx *ctx);
void sdw_intel_pre_exit(struct sdw_intel_ctx *ctx);

irqreturn_t sdw_intel_thread(int irq, void *dev_id);

Expand Down
3 changes: 3 additions & 0 deletions sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ static int hda_sdw_exit(struct snd_sof_dev *sdev)

hdev = sdev->pdata->hw_pdata;

if (hdev->sdw)
sdw_intel_pre_exit(hdev->sdw);

hda_sdw_int_enable(sdev, false);

if (hdev->sdw)
Expand Down