From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Wei Xu <xuwei5@hisilicon.com>, Nishanth Menon <nm@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Jan Kotas <jank@cadence.com>, Li Wei <liwei213@huawei.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Yaniv Gardi <ygardi@codeaurora.org>,
linux-scsi@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property
Date: Tue, 22 Feb 2022 15:58:48 +0100 [thread overview]
Message-ID: <20220222145854.358646-10-krzysztof.kozlowski@canonical.com> (raw)
In-Reply-To: <20220222145854.358646-1-krzysztof.kozlowski@canonical.com>
The 'freq-table-hz' is not correct in DT schema, because '-hz' suffix
defines uint32 type, not an array. Therefore deprecate 'freq-table-hz'
and use 'freq-table' instead.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 87975d1a21c8..2b192477d158 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -47,8 +47,9 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
if (cnt <= 0)
goto out;
- if (!of_get_property(np, "freq-table-hz", &len)) {
- dev_info(dev, "freq-table-hz property not specified\n");
+ if (!of_get_property(np, "freq-table", &len) ||
+ !of_get_property(np, "freq-table-hz", &len)) {
+ dev_info(dev, "freq-table property not specified\n");
goto out;
}
@@ -57,7 +58,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
sz = len / sizeof(*clkfreq);
if (sz != 2 * cnt) {
- dev_err(dev, "%s len mismatch\n", "freq-table-hz");
+ dev_err(dev, "%s len mismatch\n", "freq-table");
ret = -EINVAL;
goto out;
}
@@ -69,12 +70,16 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
goto out;
}
- ret = of_property_read_u32_array(np, "freq-table-hz",
+ ret = of_property_read_u32_array(np, "freq-table",
clkfreq, sz);
if (ret && (ret != -EINVAL)) {
- dev_err(dev, "%s: error reading array %d\n",
- "freq-table-hz", ret);
- return ret;
+ ret = of_property_read_u32_array(np, "freq-table-hz",
+ clkfreq, sz);
+ if (ret && (ret != -EINVAL)) {
+ dev_err(dev, "%s: error reading array %d\n",
+ "freq-table", ret);
+ return ret;
+ }
}
for (i = 0; i < sz; i += 2) {
@@ -99,7 +104,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
if (!strcmp(name, "ref_clk"))
clki->keep_link_active = true;
- dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table-hz",
+ dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table",
clki->min_freq, clki->max_freq, clki->name);
list_add_tail(&clki->list, &hba->clk_list_head);
}
--
2.32.0
next prev parent reply other threads:[~2022-02-22 15:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 14:58 [PATCH v2 00/15] dt-bindings: ufs: add common platform bindings + fixes Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 01/15] dt-bindings: ufs: add common platform bindings Krzysztof Kozlowski
2022-02-25 19:26 ` Rob Herring
2022-02-27 10:24 ` Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 02/15] dt-bindings: ufs: samsung,exynos-ufs: use common bindings Krzysztof Kozlowski
2022-02-25 19:26 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 03/15] dt-bindings: ufs: cdns,ufshc: convert to dtschema Krzysztof Kozlowski
2022-02-25 19:28 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 04/15] dt-bindings: ufs: drop unused/old ufs-qcom PHY bindings Krzysztof Kozlowski
2022-02-22 18:03 ` Bjorn Andersson
2022-02-25 19:32 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 05/15] dt-bindings: ufs: qcom,ufs: convert to dtschema Krzysztof Kozlowski
2022-02-22 15:01 ` Krzysztof Kozlowski
2022-02-25 19:33 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 06/15] dt-bindings: ufs: hisilicon,ufs: " Krzysztof Kozlowski
2022-02-25 19:34 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 07/15] dt-bindings: ufs: mediatek,ufs: " Krzysztof Kozlowski
2022-02-25 19:34 ` Rob Herring
2022-02-22 14:58 ` [PATCH v2 08/15] dt-bindings: ufs: snps,tc-dwc-g210: " Krzysztof Kozlowski
2022-02-25 19:35 ` Rob Herring
2022-02-22 14:58 ` Krzysztof Kozlowski [this message]
2022-02-22 16:44 ` [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property Alim Akhtar
2022-02-23 8:23 ` Krzysztof Kozlowski
2022-02-22 18:16 ` Bjorn Andersson
2022-02-23 9:15 ` Krzysztof Kozlowski
2022-02-24 16:51 ` Bjorn Andersson
2022-02-22 14:58 ` [PATCH v2 10/15] arm64: dts: hi3670: use 'freq-table' in UFS node Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 11/15] arm64: dts: ti: " Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 12/15] arm64: dts: qcom: " Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 13/15] arm64: dts: qcom: msm8996: drop unsupported UFS vddp-ref-clk-max-microamp Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 14/15] arm64: dts: qcom: msm8996: correct UFS compatible Krzysztof Kozlowski
2022-02-22 14:58 ` [PATCH v2 15/15] arm64: dts: qcom: sm8350: drop duplicated ref_clk in UFS Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222145854.358646-10-krzysztof.kozlowski@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jank@cadence.com \
--cc=jejb@linux.ibm.com \
--cc=kristo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=liwei213@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=stanley.chu@mediatek.com \
--cc=vigneshr@ti.com \
--cc=xuwei5@hisilicon.com \
--cc=ygardi@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).