From patchwork Wed Oct 26 11:02:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 618992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E874ECDFA1 for ; Wed, 26 Oct 2022 11:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233376AbiJZLC0 (ORCPT ); Wed, 26 Oct 2022 07:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232931AbiJZLC0 (ORCPT ); Wed, 26 Oct 2022 07:02:26 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95EA3B56D5 for ; Wed, 26 Oct 2022 04:02:24 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id l16-20020a05600c4f1000b003c6c0d2a445so1255063wmq.4 for ; Wed, 26 Oct 2022 04:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Iq+UTjOWMyquGHaqNGU9bVUM+RbHUdDoO13dPtnzSfU=; b=kkr8je1+7h37yq2UCQzx7bziwp9BgRGHNSqBb7MHWFDsWbjGPduEr3Jl4E1yYfBt0Q 2rH15nIYWCvOOnIr8WyHRKxRHoqQFq1ctID5UQJJ27i0gf4/9mbP647SAxtQEEd70ciO xE+gccJPfzpgshvNKQIhRcfy0mF3ECaew3cgZz7OeL8zh2jlodY2AeFhDGYLNK4BCj7i LfgT8ODc6dk9tcQcKjJzUIq2h3A515ZhcAmRFDopXRHNoNPCnbKneJOUv34RYE1KLypw r3Ro1TF5ufrWemVsjdkN3Q9NoZsxph7y2TBCpZvSpDmSaREstiDlBhBjg5zlNyYtWRTZ zlkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iq+UTjOWMyquGHaqNGU9bVUM+RbHUdDoO13dPtnzSfU=; b=bFk6RSecm9YByrilOS/ei8VVTTrS/rW9l3n6V6YyKPI8nrNUtEUGDFE5vttTPhz8jm fi4nHqWCWDtgsNfISMtVg/vuHSL5+9z9RFT4c16KJBOqYnfbCnAz8JqadzpGyO44oD1Z YGbiDRNr7DiH4s874/swmQBtuV0IRLvqdkiBH0mP15ZQLrvOUesdV1U6pbl47rlm59QC tEmHQ0PCaHFpnZea/DCIe6Eatbd24GSwxfVkcQUffU8rkg5hdKe9s6ZZNznzYG43WKtX 7CrswJf0i/8Ww4392s/XDmy/24BcDdplXZtpkhEFAvExUcINtLR9oC3N1LL0m+RB7njr oV/Q== X-Gm-Message-State: ACrzQf2G3Kpq9Fck9gWiYH/XrSNItL9GOmRHuwYeap8G64yFiNB8Z6ok +9aY/MdC9ajHON7x8BQyx6+PVg== X-Google-Smtp-Source: AMsMyM5ZSYi57o1Z5QN7tWgoVXorQQMv/TaZXk+ZadlHoHTu14idvd4TR9hgJSmpkJHVthLxM8k9cg== X-Received: by 2002:a05:600c:3585:b0:3c7:9f:5f87 with SMTP id p5-20020a05600c358500b003c7009f5f87mr2101249wmq.76.1666782143122; Wed, 26 Oct 2022 04:02:23 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id z7-20020a5d44c7000000b0023672104c24sm5237415wrr.74.2022.10.26.04.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:02:22 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/6] soundwire: qcom: reinit broadcast completion Date: Wed, 26 Oct 2022 12:02:05 +0100 Message-Id: <20221026110210.6575-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> References: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org For some reason we never reinit the broadcast completion, there is a danger that broadcast commands could be treated as completed by driver from previous complete status. Fix this by reinitializing the completion before sending a broadcast command. Fixes: ddea6cf7b619 ("soundwire: qcom: update register read/write routine") Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index b33d5db494a5..8f1a1eb017a2 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -344,6 +344,9 @@ static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *swrm, u8 cmd_data, if (swrm_wait_for_wr_fifo_avail(swrm)) return SDW_CMD_FAIL_OTHER; + if (cmd_id == SWR_BROADCAST_CMD_ID) + reinit_completion(&swrm->broadcast); + /* Its assumed that write is okay as we do not get any status back */ swrm->reg_write(swrm, SWRM_CMD_FIFO_WR_CMD, val); From patchwork Wed Oct 26 11:02:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 618991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A6BCECDFA1 for ; Wed, 26 Oct 2022 11:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233390AbiJZLCa (ORCPT ); Wed, 26 Oct 2022 07:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233463AbiJZLC2 (ORCPT ); Wed, 26 Oct 2022 07:02:28 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34C45B56EA for ; Wed, 26 Oct 2022 04:02:27 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id l32so9928916wms.2 for ; Wed, 26 Oct 2022 04:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Icdth5bW06+FTiDoc6hzh4mTVqW0L169qAB+NpMSMiM=; b=VrUr1NCqQmWFyAAU8xzsnEdntA2wopK+LECDVycJpX4G8I9suVjN5U2pA/sRjdlQc2 AjUMKsTseDp1cTKb1O1il6+2kxcppqLOqrhR2Ekv8lQ6m4TiO991UyalYak5OxK99zxg vmDbHoZcft+3vVRz0QmX4tZ+OC4vGw0x8naTY/mvyBGMcamwAWU6wF34wlFy9Hq43MBU /CoIuijMweor3KlcVb3yXz+0rM8lBIjOcuoFhvfeeBlxtllk7oO4x9IYtwfM/P9Wsg2O YpmcQwBpz/U/JByaWi/jllXHminB/nirn90SXxjbZyaeacCUzDKP/Ui1sT5WIDh/3icv KJFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Icdth5bW06+FTiDoc6hzh4mTVqW0L169qAB+NpMSMiM=; b=3t59bcLqzgLcnZxzM6i5VV4obKmdHtAW7QtqEwTBob7rcpxNby7PAmtN8SlPX1rNpD L/9w65XlakfsgR/Ee1RCVA4GeUFwU1wYwf7incTAME4Z9SqEqz3aa1yPDTr33j5HvGzH PISScWV2zpqDELllZy11JEYH2EL5zBkXrd8rQfuazfsnHWAozflFTXgN18DI08lnTRfw Z5lYlJmL4JZX8xLz+pbBO/6MmebgK5p3XHTkn3pUJMcdG3OTvm2X211D8HocHna0hcK/ N/ytdnKQRRA40wA2ltShgfv4sDvxQlsg5QQwF9m2NEvv15ABchMNN8vGVtWfCET/fH28 J6qQ== X-Gm-Message-State: ACrzQf2NtJVS8TrQY/UBBrXlJavRIFlcnxzVlFcAn5Oy9reH7iypePun Qujm2k6e/8UUm3e3n0Jh70aiUg== X-Google-Smtp-Source: AMsMyM4q4OHE6RmbiZDYRwiXOXmCru6tDJV/srJq2vODKrrYg75XoI6m51lSA+DN0/3zGGraIQKS0A== X-Received: by 2002:a05:600c:3d8a:b0:3c6:f241:cb36 with SMTP id bi10-20020a05600c3d8a00b003c6f241cb36mr1993088wmb.115.1666782145763; Wed, 26 Oct 2022 04:02:25 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id z7-20020a5d44c7000000b0023672104c24sm5237415wrr.74.2022.10.26.04.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:02:25 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 3/6] soundwire: qcom: remove unused SWRM_SPECIAL_CMD_ID Date: Wed, 26 Oct 2022 12:02:07 +0100 Message-Id: <20221026110210.6575-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> References: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index cee2b2223141..7bc8cd0e906b 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -104,7 +104,6 @@ #define SWRM_REG_VAL_PACK(data, dev, id, reg) \ ((reg) | ((id) << 16) | ((dev) << 20) | ((data) << 24)) -#define SWRM_SPECIAL_CMD_ID 0xF #define MAX_FREQ_NUM 1 #define TIMEOUT_MS 100 #define QCOM_SWRM_MAX_RD_LEN 0x1 From patchwork Wed Oct 26 11:02:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 618990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87C61C433FE for ; Wed, 26 Oct 2022 11:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233476AbiJZLCf (ORCPT ); Wed, 26 Oct 2022 07:02:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233484AbiJZLCa (ORCPT ); Wed, 26 Oct 2022 07:02:30 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE206B5FCA for ; Wed, 26 Oct 2022 04:02:29 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id k8so17041174wrh.1 for ; Wed, 26 Oct 2022 04:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M5yIrMJGpCUVHY5GfvEg2i8ek5laLkQGA9zDhfgH9W8=; b=O0WFoE7vynG5KsDSLBTFaIikesyRanRpjq1Fbxh8BuIkEZPvwoh44dIJul80ph+gwD rZwgeujH8Jrqy5sdsHIof+RuuAV1KqKL3KvfAiG9wLOC8xAfKuEGIHPtn06ySffpqZeN aumbCJgl4ls0yXf6bpilHRmPTXLhy5a6pUOkhhqlLa+tzfaJYuttbymXSDmZojdGgdlt oloWKlyka5phBa9RRrNKMY1mQ2Uf65iVjz7uBeQzrvMXrP+GScvYRgOY+e9rSC36yBBz ed77qagUS1Rob8EEX/CWe50WoKf67T7rcO0R7hgkdOJFEpDEWF0MT5e7ysaxAynioCu8 9Sqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M5yIrMJGpCUVHY5GfvEg2i8ek5laLkQGA9zDhfgH9W8=; b=vPZkavAFkLmqV48sp9DIwyDyqy5Dltimq6IV+XCodukHfVL5syXDpGZjsShnguSoqe AiX50g57CqnF4Y581xdQ2Wt9D/Xq19BMkdt6V6H+qBzVWoE96JSXHq0SXFPPmhF1cw0I t5FoCpGgwhcIeXsoymKEFJSKKN3BR5wPf+v6ZLE5GMCnqACWr2EXFXJe3U2ksxG2jtxn wxAleuko8NpJ/+OfZWzsezcz8+2TBrmEiiP8T0Ajj+INYvIL4keDVJSKTGFVg9k7BeGY acNhwVfjHLovcLbokw4QZJ6dnWoP1ZIjasH0xpVH+PIIzgJc7U7tANB112062L6HY801 EuYQ== X-Gm-Message-State: ACrzQf0vYBG3SbY2VtW3UJ1URpifWmORH+v7QRwrMoC+wjS25sYEYJs4 lv1ue5ZxkmjyFKKJAyrqV/XE4A== X-Google-Smtp-Source: AMsMyM5yubBRK+wTdLXV82WHsx/yLGwYXhc+1W6ivTLWBc2NSpO2f9tW06JksBg6fsNSAz3QPdSJTQ== X-Received: by 2002:a05:6000:1f87:b0:236:7683:e5c0 with SMTP id bw7-20020a0560001f8700b002367683e5c0mr9178434wrb.193.1666782148331; Wed, 26 Oct 2022 04:02:28 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id z7-20020a5d44c7000000b0023672104c24sm5237415wrr.74.2022.10.26.04.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:02:27 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 5/6] dt-bindings: soundwire: qcom: add v1.7.0 support Date: Wed, 26 Oct 2022 12:02:09 +0100 Message-Id: <20221026110210.6575-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> References: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/soundwire/qcom,sdw.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt index c85c25779e3f..e0faed8dceac 100644 --- a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt @@ -13,6 +13,7 @@ board specific bus parameters. "qcom,soundwire-v1.5.0" "qcom,soundwire-v1.5.1" "qcom,soundwire-v1.6.0" + "qcom,soundwire-v1.7.0" - reg: Usage: required Value type: