diff mbox series

[v2,2/2] soundwire: qcom: do not send status of device 0 during alert

Message ID 20220916135352.19114-2-srinivas.kandagatla@linaro.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] soundwire: qcom: update status from device id 1 | expand

Commit Message

Srinivas Kandagatla Sept. 16, 2022, 1:53 p.m. UTC
Device0 can not be in alter status. And for consistency reasons do not
send status of device0 to core.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/soundwire/qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pierre-Louis Bossart Sept. 16, 2022, 2:22 p.m. UTC | #1
On 9/16/22 15:53, Srinivas Kandagatla wrote:
> Device0 can not be in alter status. And for consistency reasons do not

typo: alert

> send status of device0 to core.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  drivers/soundwire/qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index d3ce580cdeaf..a04a8863b228 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -428,7 +428,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)
>  
>  	ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
>  
> -	for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) {
> +	for (dev_num = 1; dev_num <= SDW_MAX_DEVICES; dev_num++) {
>  		status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));
>  
>  		if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {
diff mbox series

Patch

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index d3ce580cdeaf..a04a8863b228 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -428,7 +428,7 @@  static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)
 
 	ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
 
-	for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) {
+	for (dev_num = 1; dev_num <= SDW_MAX_DEVICES; dev_num++) {
 		status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));
 
 		if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {