From patchwork Thu Nov 3 19:53:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 15149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp738020wru; Thu, 3 Nov 2022 12:57:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FNfcCub8AIlm80pcooa8ZMhJ204CZUt5oMAu3PqtdAGZwiz+MAojaDnHyUVOh9Vy7P8XE X-Received: by 2002:a63:2c0b:0:b0:434:ebb6:7594 with SMTP id s11-20020a632c0b000000b00434ebb67594mr26734608pgs.245.1667505434113; Thu, 03 Nov 2022 12:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667505434; cv=none; d=google.com; s=arc-20160816; b=u5RdaFaVQdQWIQ/fDJZ71uwbWQuD1/IDHPLTVEH+UdAWVtvOVwXKQZqh0KxPKZSRFj 1rN5QvX90ntXGShTa81s+OihbRBjRRSX7Uu7yUZPvLs3z2KSEyffotrOBhqIK4XqDnvC YWIVzhHs1lhd2ZCOyQmWWtlU4V/lNxsxLXPtedZDs3hjXk2Qfl4NrBDXjM5LAFpShHE6 QQ4oR5/6Uh6ldzfTx4rNQyWKHeK+EI74b8HRGYvzZifOaoKhrlKRAnNPyd2V31K0Fnf8 cAEiRSKGZ7mc7yPkT1AKnIhZXlHqVjStlX6TMVDciNe9npyDyQLzZOCHz3kZVzGZ3+Z2 bBbg== 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=B8OPD5SdDugxqBTcH6K5BwRgjhIONxvnoSDJQa8wlKs=; b=a4Zg9SWnr5Bpmj5EQf5DzHSRRAEs0cyZjgvqe649rHu0Gidywt2Z/AGNWwK4VxfU3z BARH6UhYtZf9ZbTCTVq4Oy0juDXAYNeUmsf2bVPjxLW0k6cVsK1pV32tLKOL7/nWY2Yt QNMwLRk11a13QrIFNONh9UxzpM3/7qyqTQdhSDszqJRWJ1Qgx8TEMiIrrIZKQLRGbUve W8Dm7ZvVliCnNpI9M0ctA4eIq8D1H5Uk8gNLvLXGoaCBPMQns8BSLMWbXF/69s4xm6uB kuciBLNR1Zm7WdRNQ2304gBmIVuainslrDwz/2p2Si7nqV5a+lh5YTfxLMi1v55vAKBw 7Jdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NiOjngkr; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170903124b00b001783af487d1si1985302plh.533.2022.11.03.12.56.57; Thu, 03 Nov 2022 12:57:14 -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=NiOjngkr; 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 S231420AbiKCTyf (ORCPT + 99 others); Thu, 3 Nov 2022 15:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbiKCTxq (ORCPT ); Thu, 3 Nov 2022 15:53:46 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBCE1E3D8 for ; Thu, 3 Nov 2022 12:53:45 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id v8so1857137qkg.12 for ; Thu, 03 Nov 2022 12:53:45 -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:message-id:reply-to; bh=B8OPD5SdDugxqBTcH6K5BwRgjhIONxvnoSDJQa8wlKs=; b=NiOjngkra0YgcxX92AvSFHaEiKJ2RLuDxh5KHGSXBUij3nxztpOaWtHGt2cVeSi6QD c3hajrwQnWk40SBqrwYqQ39whdrLxYZKDapLoBI3w7fFsdXMCr7XPK+4Z7j613yhCPnx HGuUgn7IqXQioBmJ7tHHp+zewdzqM0NZbH5vCeI4p7cxz+0IgNWXvCSUQGYUzI7Zlzwz 1U4GtWjm/5VJSaeLFfmBCqftDUgx+vrRk4zkPcgELzwF3gZtRGLav/eCwBe0a2Sef7Iw iGz/1HVFmJsIw3FbtPSR6udzyfz0/lyNFImtdgnyWFA8ke6Jybj1s8JUKF+IDdCyAxB/ 1rVA== 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:message-id :reply-to; bh=B8OPD5SdDugxqBTcH6K5BwRgjhIONxvnoSDJQa8wlKs=; b=gqDTqbwsyAQuEciMVGN9Okwnj2PKKowttR22b5hHZo5Uy1UQ6rDTtbIDdXtIuSvlcY cWDkbZ0tF2FoulBuVc+3vM+VtR+vA3tgUvV3ihPirZikTaaG4M3XpKLOghc/fCWw/juJ 204wq7DjeAn8Va6j6Zo4M8LhV4luAbxvwdeDM3dbXoaUDUjf975jgoPQxO9NH2CQB3JQ I/RySQoOurpthwlanSShR91RG9MglVUkq8IX0KJ3cswBUHNnMUo9y4GKE9OnDSKmm1B6 OjdGlzIwzpZb4Op/6eDkHcrxORoiTGXSU31MBoKWyMGyL3cGlFmsSRGBOopm8NvJGIpw L0iA== X-Gm-Message-State: ACrzQf3Gj/8a+jAYhY1O22/EUfu9K1H+n6YBQxRWMUcG5fUabErMBomP e7ouftQbeMtx/sk5xy7PwNxBYQ== X-Received: by 2002:a05:620a:13ee:b0:6fa:1ef7:a3b7 with SMTP id h14-20020a05620a13ee00b006fa1ef7a3b7mr20957047qkl.265.1667505224868; Thu, 03 Nov 2022 12:53:44 -0700 (PDT) Received: from krzk-bin.. ([2601:586:5000:570:a35d:9f85:e3f7:d9fb]) by smtp.gmail.com with ESMTPSA id de41-20020a05620a372900b006b615cd8c13sm1328892qkb.106.2022.11.03.12.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 12:53:44 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Date: Thu, 3 Nov 2022 15:53:39 -0400 Message-Id: <20221103195341.174972-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748506177893768442?= X-GMAIL-MSGID: =?utf-8?q?1748506177893768442?= The purpose of clock-output-names is to customize desired clock name, not use one, same name. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 3 +-- .../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 3 +-- .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 3 +-- .../devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml index 1de11e7f33bb..14016671f32b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml @@ -43,8 +43,7 @@ properties: - const: fsgen clock-output-names: - items: - - const: mclk + maxItems: 1 power-domains: maxItems: 2 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml index de8297b358e8..e647ba392a0f 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml @@ -43,8 +43,7 @@ properties: - const: fsgen clock-output-names: - items: - - const: mclk + maxItems: 1 power-domains: maxItems: 2 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml index 9f473c08cb2e..c36caf90b837 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml @@ -39,8 +39,7 @@ properties: - const: mclk clock-output-names: - items: - - const: fsgen + maxItems: 1 power-domains: maxItems: 2 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml index 4959ad658eac..155c7344412a 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml @@ -38,8 +38,7 @@ properties: - const: fsgen clock-output-names: - items: - - const: mclk + maxItems: 1 qcom,dmic-sample-rate: description: dmic sample rate From patchwork Thu Nov 3 19:53:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 15150 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp738057wru; Thu, 3 Nov 2022 12:57:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UTJJQM8jMvoNzq/Wi1tkmZ2HbthlXuql8X+5mbAA5fOY3fYONisYCCj5980jLvqkbpW7d X-Received: by 2002:a05:6402:1d4e:b0:461:c7bd:7d9c with SMTP id dz14-20020a0564021d4e00b00461c7bd7d9cmr31688930edb.284.1667505439552; Thu, 03 Nov 2022 12:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667505439; cv=none; d=google.com; s=arc-20160816; b=qGKE1o/OUsR3y7v+gP19uH3EdhvPHFPUCvXukYXPsJrK5SMhZ6rlrKEzH92Fe9SdsT iEE8bE3rKHWKuP8GbQQwjUCyTOIKFr86lgD45uU3uTnc3bW9NVog8jD31YtjPY4NQIYb 7DEi09hm9AqTW3w89GOzxPkvGRaojZ9e1tTvbCpH8P89ChmFyuv3+hqgkDuU8SKouMrV FOIBsPJwYZZEXMRPpsg2qY2Ec3IaNBkwYVjq9OSy98JNqQ8yNmd+gqm7MDmf506ZKNcy NS6mp3ANsuCeLJbrpBR4DXSAcOv+OHQoNylH5YODnc/ruNfJDhjN9UGuHnR+TeCpo4VO 7c7w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qi/QHriO9WLQrr+WCirZAkAs6AyTOYgHq/qkN2NOeAY=; b=ePq/gVqUwUa61v5WyRg2dtH396xz9tkJxJrB3vIxGl3TKwwIudn2jdYhOXg+fV8qyb k9mHrah9nlHQOMNpIkeKf5jvpIa71rWL1nIrCiNAmubTvqebxDwFCOGIbMvQrlfuf7u3 +sNYcLzuVwiDoRwLZgNcFdhVYkOgcOFtDqj14z7zQzRePLFFXMpOhDwqV9bWhTaYyl18 yWTglPxRiliShXsNyveOp/ZDPykYqnp1YJjwDeQr4Fe/Ca6kSo5an9i69weCSJHUYATa R30fkEhzErf/ZcSXBe+rWCPxludDzkAi5g5LCvCcria775WYQBToDTCG2CmaWa7msXB4 wGNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hyOVUena; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho42-20020a1709070eaa00b00781dbeebeb1si2582119ejc.585.2022.11.03.12.56.54; Thu, 03 Nov 2022 12:57:19 -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=hyOVUena; 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 S231411AbiKCTy2 (ORCPT + 99 others); Thu, 3 Nov 2022 15:54:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbiKCTxs (ORCPT ); Thu, 3 Nov 2022 15:53:48 -0400 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABE11F63C for ; Thu, 3 Nov 2022 12:53:47 -0700 (PDT) Received: by mail-qv1-xf2b.google.com with SMTP id x13so1874194qvn.6 for ; Thu, 03 Nov 2022 12:53:46 -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=Qi/QHriO9WLQrr+WCirZAkAs6AyTOYgHq/qkN2NOeAY=; b=hyOVUenakbhimpBLe4rmEpbp4laB8yVoIzkgZ0Go7fnS1YY/EUj0RndvLYOdyp21hc AoSMLyQHYqqCqG+g0NgFxbVStOY5sxLOPrMSu2sDNW/L7jxNT0v/h30XE7o4eRGb1CM2 p+hwpbfgLIGIUM2Y5kzXfZ/EdzsDrryoP3pEnxfiAbpRz94QjhY0QKcuVd683sqJuadN I2HlhLzw7b8Z0E9GGv1l6RFEZh6CKrMUl+StnZ31qbx6tFuKsMqbELu2vse2lUiAZ0hY nfzdkoGWpo8F2RurQkdkczNaar0/e92wH0V8NdUypy9ULrgRpuMicbvRkjwvjq7CApAM U4Tw== 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=Qi/QHriO9WLQrr+WCirZAkAs6AyTOYgHq/qkN2NOeAY=; b=jIF9qgyhAXjguR2Q4NG1294WFFqbibz5EAg9BI9AeqKkApHxb80K2AHgqD4miq+WLx y1lFdWNiCnJ0WS8JRrDuu5pE2kknOZanYGZK69LIpJtAWuy38WCRm1rXvwx9TTetdKCS BGqRqApxLvHLgZZlzFM2Rzvf7mhDVMF5EyzjxzRSEQfz7a7xioiEWDF5G/YnLfs2/nHK C1lggtGR5qGginJzzkzOzvPgSZtwzg5yVMHlNnkWQ9eHMhe81IC6lwxNIjCia1SQTEv+ 6t3Hi1xgfwC/lsWF8sSFu/iXmSABW5CvW6aGHTxkcOgnySqTIsFjhRro8hExZ95bT2MJ Lbxg== X-Gm-Message-State: ACrzQf1QYFQeHZA1GpVK7Y/IoWHWifZErIDRbLS3Hxz+TkZ0dtj2UTfJ KvBSczn148k72vfRpFeGUa0UDw== X-Received: by 2002:a05:6214:20e2:b0:4bb:7aa5:bf0a with SMTP id 2-20020a05621420e200b004bb7aa5bf0amr28398378qvk.112.1667505226196; Thu, 03 Nov 2022 12:53:46 -0700 (PDT) Received: from krzk-bin.. ([2601:586:5000:570:a35d:9f85:e3f7:d9fb]) by smtp.gmail.com with ESMTPSA id de41-20020a05620a372900b006b615cd8c13sm1328892qkb.106.2022.11.03.12.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 12:53:45 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names Date: Thu, 3 Nov 2022 15:53:40 -0400 Message-Id: <20221103195341.174972-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103195341.174972-1-krzysztof.kozlowski@linaro.org> References: <20221103195341.174972-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748506183869285018?= X-GMAIL-MSGID: =?utf-8?q?1748506183869285018?= If we have several instances of WSA macro, each one of them should register clock with unique name, so parse clock-output-names for this. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/lpass-wsa-macro.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 5e0abefe7cce..5cfe96f6e430 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -2350,14 +2351,15 @@ static int wsa_macro_register_mclk_output(struct wsa_macro *wsa) { struct device *dev = wsa->dev; const char *parent_clk_name; - const char *clk_name = "mclk"; struct clk_hw *hw; struct clk_init_data init; int ret; parent_clk_name = __clk_get_name(wsa->npl); - init.name = clk_name; + init.name = "mclk"; + of_property_read_string(dev_of_node(dev), "clock-output-names", + &init.name); init.ops = &swclk_gate_ops; init.flags = 0; init.parent_names = &parent_clk_name;