Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 669089fd authored by Sudheer Papothi's avatar Sudheer Papothi Committed by Gerrit - the friendly Code Review server
Browse files

soc: soundwire: Handle soundwire slave reset gracefully



If soundwire slave does not implement reset functionality, handle
soundwire slave reset error gracefully in soundwire master driver.

Change-Id: I24f34d3e8665c187c4ac9dd2bc8acb2b39ad2df6
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
parent 265ff04d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/irq.h>
@@ -3038,7 +3038,12 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
		mutex_lock(&swrm->reslock);
		list_for_each_entry(swr_dev, &mstr->devices, dev_list) {
			ret = swr_reset_device(swr_dev);
			if (ret) {
			if (ret == -ENODEV) {
				dev_dbg_ratelimited(swrm->dev,
					"%s slave reset not implemented\n",
					__func__);
				ret = 0;
			} else if (ret) {
				dev_err(swrm->dev,
					"%s: failed to reset swr device %d\n",
					__func__, swr_dev->dev_num);