Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp748958rwn; Thu, 15 Sep 2022 06:04:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4So0TjqsxNaoftJeBapKu8296wrPb+8po5tjqwFQ5JmWrM9AMRJO73gHbnjW6H77QQSFJr X-Received: by 2002:a05:6402:2816:b0:434:ed38:16f3 with SMTP id h22-20020a056402281600b00434ed3816f3mr34352728ede.116.1663247082317; Thu, 15 Sep 2022 06:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663247082; cv=none; d=google.com; s=arc-20160816; b=MKSXQUaUsVsO6PGw21yGVWcwBHUS0m9OVrM72LxYQv2MR+hDqE2lN5Jkgn0kvzDxY+ zzd2IQZFFh3suMNFcqgo4KzP1QFa+T3RmtRkg3LQ5SeC22KW1mcJs4a4H0794k96vpEr DhdlzpOXpM2gdvVMhK/Vr+qyrXv9j2pzm78oiZUsEYsH1V4DxFkamEsTXEMbNiVLgXMf 8aC9JrZjJXUoex1IlfOZvteQglU4lInQ21/gs5y35/DiKCcpJL73CbQ6JyX7i1owAi4y T3mLyG4edvxv/b4nCMZtLNKGIqvkgDYK8BfNRclTp5+v5a5jCSB2iGyBfTr0ohKIDTvH LQAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5CMlBI/PrKLuiXDRVCmkwWXBv4d9T3I5m7kPv3uZKXk=; b=sLh0FE4u8yRP7P0+5g4TaZqvunkP1h60XP+BZAlxpqC+1GLENkTIX/l96m/7MBLJkY 1PVoDlyUDxGHV9s7X1Z/6V5YEqR2YFUAHn3RwD+zPuq/Na0Xu7rzIQTzkijGq3TODyai VPr2w7QfKr564xE9urfvliyfv2epDrdk9t1YxU3iNO1mZ7+h1Oc6Gcq9UnazsLkzkcsF x7LQp7qfA6xawWj+0U3zn/BtEFy+pbnRqQG5G2EFhiO/nJLcFDfPoR8/0vr8JyDh+p/I /uhfO+S3nd3JhqFQcKfMd/hTeh7r+RyCKx+Zpps0CsCrxYvo7h/1FpwUz8r0Mv3brMSc SN6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LlF+gnOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt40-20020a1709072da800b0077ef2f9c8b7si8298869ejc.922.2022.09.15.06.04.15; Thu, 15 Sep 2022 06:04:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LlF+gnOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbiIOMm3 (ORCPT + 99 others); Thu, 15 Sep 2022 08:42:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbiIOMmZ (ORCPT ); Thu, 15 Sep 2022 08:42:25 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9656411A0B for ; Thu, 15 Sep 2022 05:42:22 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id n10so97501wrw.12 for ; Thu, 15 Sep 2022 05:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=5CMlBI/PrKLuiXDRVCmkwWXBv4d9T3I5m7kPv3uZKXk=; b=LlF+gnOCTKInIpXUMWd7obhKq5M2pJu5O+Wb3rhT2HxfBdERUsLE1wWgnOlJfg/q4K 5Q5NYgl0EI7oudjmN2BXcWJ+A68ZdIYq0HPrx7dvi02Z6xKSkrgyEtaRuwEmGfHU9tMh nsM98mhMPbu5R4iLSaJMKjePD/uulH7Xs45cvI3yzh9mvo2cALXcc+hs1wlnMENiyAL0 3qGjhwXNtoVkDOzxGLFh4G2f3OodGTSla8G8Osdc7DhVa3ehbWXvP9QUnXqVUQwf3V6B KLqFvvvFu+W3HaZPn+yMpwjTfJzGURbTj+bOerzKyfrWygYV0lEkt7cWCSwGJ8szxcmx cDlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=5CMlBI/PrKLuiXDRVCmkwWXBv4d9T3I5m7kPv3uZKXk=; b=4BGSweReCqp/WJ9rBVROQSjjMT2WVzYTY86H270+D3DGwqgeNOGMQFsB56rGlvh6Ca 9Crhi6cPVLKzTts2yiCaFkXgvxllZpij8XUdPL5nzwQRvxbEeUsFPgj5qqlnAhjr2v6H h/uOa73TnTSL0FdNIQWPkyVwCHrnWDMZvdV/RCU3OdNfLRckkfFHnBcAZNjz1gifEzr2 gJhPsktARXVdNede0VXydCncvnrLs9tOjZi7iHe9Vamggy1MtTgv907fyQf0y6+rIjBh Z50oGwA4q8NWq7jIwP3QADqNOQIvertKN2gjXwpw4eh7toVb8C8QmGeSRi4rvPTOcpct eJYw== X-Gm-Message-State: ACrzQf24BIU5SSPhc4t8c5A2bw60o9/yc2q0N6CvEaaxe7ldukos2mNL +HVwLrWHiIAG49/4LunxRJZEeqGcpqeISw== X-Received: by 2002:adf:eec3:0:b0:22a:d159:456c with SMTP id a3-20020adfeec3000000b0022ad159456cmr1895699wrp.463.1663245740879; Thu, 15 Sep 2022 05:42:20 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id ay29-20020a05600c1e1d00b003b4ac05a8a4sm2783145wmb.27.2022.09.15.05.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 05:42:20 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com, Srinivas Kandagatla Subject: [PATCH] soundwire: qcom: update status from device id 1 Date: Thu, 15 Sep 2022 13:42:15 +0100 Message-Id: <20220915124215.13703-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By default autoenumeration is enabled on QCom SoundWire controller which means the core should not be dealing with device 0 w.r.t enumeration. Currently device 0 status is also shared with SoundWire core which confuses the core sometimes and we endup adding 0:0:0:0 slave device. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index e21a3306bf01..871e4d8b32c7 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) { @@ -448,7 +448,7 @@ static void qcom_swrm_get_device_status(struct qcom_swrm_ctrl *ctrl) ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val); ctrl->slave_status = val; - for (i = 0; i <= SDW_MAX_DEVICES; i++) { + for (i = 1; i <= SDW_MAX_DEVICES; i++) { u32 s; s = (val >> (i * 2)); -- 2.21.0