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

Commit 73e66283 authored by smanag's avatar smanag Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wsa881x-analog: Handle update of WSA probe count



wsa881x_probing_count is checked in machine driver of 8953/37/17
for sound card register to proceed.
Machine probe was getting deferred continuously if targets
do not have wsa speakers as the wsa probe count was not updated.
Change is to update wsa probe count in this case.

Change-Id: Ib86f70442daae5066e1a8082b65d377c3de667fb
Signed-off-by: default avatarsmanag <smanag@codeaurora.org>
parent ed6ba932
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1258,8 +1258,10 @@ static int wsa881x_i2c_probe(struct i2c_client *client,

	if ((client->addr == WSA881X_I2C_SPK0_SLAVE1_ADDR ||
		client->addr == WSA881X_I2C_SPK1_SLAVE1_ADDR) &&
		(pdata->status == WSA881X_STATUS_PROBING))
		(pdata->status == WSA881X_STATUS_PROBING)) {
		wsa881x_probing_count++;
		return ret;
	}

	if (pdata->status == WSA881X_STATUS_I2C) {
		dev_dbg(&client->dev, "%s:probe for other slaves\n"
@@ -1342,6 +1344,7 @@ static int wsa881x_i2c_probe(struct i2c_client *client,
			dev_err(&client->dev,
				"failed to ping wsa with addr:%x, ret = %d\n",
						client->addr, ret);
			wsa881x_probing_count++;
			goto err1;
		}
		pdata->version = wsa881x_i2c_read_device(pdata,