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

Commit 92792e5c authored by Banajit Goswami's avatar Banajit Goswami
Browse files

soundwire: call startup function for remaining slave init



Slave devices attached to the WCD soundwire master would perform
device enumeration to determine the devices connected on the bus.
To perform this enumeration, call soundwire startup function to
invoke slave device startup function.

Change-Id: I96a21d9fe14b4bb0d8324dafcd8f4bfd63aa559e
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent ec74df35
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -953,6 +953,7 @@ static int swrm_probe(struct platform_device *pdev)
{
	struct swr_mstr_ctrl *swrm;
	struct swr_ctrl_platform_data *pdata;
	struct swr_device *swr_dev, *safe;
	int ret;

	/* Allocate soundwire master driver structure */
@@ -1059,6 +1060,14 @@ static int swrm_probe(struct platform_device *pdev)
		mutex_unlock(&swrm->mlock);
		goto err_mstr_fail;
	}

	/* Enumerate slave devices */
	list_for_each_entry_safe(swr_dev, safe, &swrm->master.devices,
				 dev_list) {
		ret = swr_startup_devices(swr_dev);
		if (ret)
			list_del(&swr_dev->dev_list);
	}
	mutex_unlock(&swrm->mlock);

	dbgswrm = swrm;