soundwire: Suppress errors due to unsupported slave functions

Suppress the errors from the soundwire master runtime suspend
and runtime resume, if the soundwire slave devices does not
implement the functionality, that avoids pm runtime calling
the runtime functions.

Change-Id: I513a37f37e349a0c435295056df8625f284e13e6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
Sudheer Papothi 2019-04-23 06:09:52 +05:30
parent 40c749da4c
commit 79c9075948

View file

@ -2293,7 +2293,12 @@ static int swrm_runtime_resume(struct device *dev)
enable_bank_switch(swrm, 0, SWR_ROW_50, SWR_MIN_COL);
list_for_each_entry(swr_dev, &mstr->devices, dev_list) {
ret = swr_device_up(swr_dev);
if (ret) {
if (ret == -ENODEV) {
dev_dbg(dev,
"%s slave device up not implemented\n",
__func__);
ret = 0;
} else if (ret) {
dev_err(dev,
"%s: failed to wakeup swr dev %d\n",
__func__, swr_dev->dev_num);
@ -2358,7 +2363,12 @@ static int swrm_runtime_suspend(struct device *dev)
swr_master_write(swrm, SWRM_COMP_CFG_ADDR, 0x00);
list_for_each_entry(swr_dev, &mstr->devices, dev_list) {
ret = swr_device_down(swr_dev);
if (ret) {
if (ret == -ENODEV) {
dev_dbg_ratelimited(dev,
"%s slave device down not implemented\n",
__func__);
ret = 0;
} else if (ret) {
dev_err(dev,
"%s: failed to shutdown swr dev %d\n",
__func__, swr_dev->dev_num);