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: 621431 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 EBCE3C433FE for ; Thu, 3 Nov 2022 19:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbiKCTyA (ORCPT ); Thu, 3 Nov 2022 15:54:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbiKCTxq (ORCPT ); Thu, 3 Nov 2022 15:53:46 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD9821CFC7 for ; Thu, 3 Nov 2022 12:53:45 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id x21so1908343qkj.0 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=ZMPOwzjZAqLQp8BjSn5YWsXrdyYnsmhtzvtd0F4iGB9oV2CdrtdI7wDOiOG/wu/fBi g/6mLco5ROVw8JrSwiltImXm3qEwi95Xk+F+LRY1gNPO8l2DdhJlfVFSYsDk2ofC1j12 lSx0BHfNFwIB02XamVVD4sZsWbKCurcD65PZ3IyoQ3sPcIMnFedT6wvV471t86RWFo6Q xxAGmtc6IY0khUDAAJ4G9f2/BkplfPRShzQh1ce2VfJD/SxKqi/WV4FPr5rTTGcwdsCZ ekEva5E3KtIjp3o5hUOVYAuKPtA0EWPY2KH0h6Sa/vjt4XAkOpz0k5+rHWy71lTcA8fj ziyQ== X-Gm-Message-State: ACrzQf1w/7h+i/tJYt0KeygHe22R+cadNd8pbqkxEeR5J1gQS8rDxDDS N04qIfgmilrcBnKTpFWugf4p3K4A0Y70BA== X-Google-Smtp-Source: AMsMyM7FFoacjbKWGh/95PpW8gyE0h/dzOYTRGJt9GOcoOtoKRUw00mgda8sl/n++3DtKfBSsR91EA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 621090 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 5317FC43217 for ; Thu, 3 Nov 2022 19:54:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbiKCTyC (ORCPT ); Thu, 3 Nov 2022 15:54:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbiKCTxr (ORCPT ); Thu, 3 Nov 2022 15:53:47 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABA01EC69 for ; Thu, 3 Nov 2022 12:53:46 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id e15so1877151qvo.4 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=FKt3TCqhl2M5sz+vt09Ohbr/FjIjSNT4vm/CO1Q7ERKbVf5nCksFxaPhWo3fPYMV4I g76aB7xsD4tm5aMEd7xmWNGSZzl7HdXu20hvlo7BUj+yUqKNhO+qhJ1XX9jGKm9/VYy5 0ngALDFtz0WfSIjBVaz0/IO5LHbdWEyw8LRSlF6xDf3M8jEsRRgaIvWBa2KlVAk5YBn0 6dYhX2fVFaSS1i/DvzaSwM3E4DRr0PNsbvJ7p35JLo0wZqVAFavLanmt13yCjHg5V6HZ Ml3PjA9EZ3kEwua3qEo5zHBRmaomc/GU9hcxKL9p0Q7lH79HwBe9pXjgD314Qqs2DRHj s3bg== X-Gm-Message-State: ACrzQf1WWXxBbU0pyLogJAptGcMqGsvpGqk94A7gD1Tp6J95VRUra/RX 6tq1TwY9du3l2x4keLv4zMCitg== X-Google-Smtp-Source: AMsMyM67CGOGnsKJJ2m829zic/y/kudxtYEKdM/yBMe08cw4Li7s1lduovri1Y843bkDlJ8rGOUcoA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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;