From: Johan Hovold <johan+linaro@kernel.org>
To: Vinod Koul <vkoul@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH 14/16] phy: qcom-qmp-pcie-msm8996: shorten function prefixes
Date: Wed, 7 Sep 2022 13:07:26 +0200 [thread overview]
Message-ID: <20220907110728.19092-15-johan+linaro@kernel.org> (raw)
In-Reply-To: <20220907110728.19092-1-johan+linaro@kernel.org>
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
.../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 93 +++++++++----------
1 file changed, 46 insertions(+), 47 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 5566c28e8e6a..2a5eef6b12f5 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -356,7 +356,7 @@ static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
.pwrdn_delay_max = POWER_DOWN_DELAY_US_MAX,
};
-static void qcom_qmp_phy_pcie_msm8996_configure_lane(void __iomem *base,
+static void qmp_pcie_msm8996_configure_lane(void __iomem *base,
const unsigned int *regs,
const struct qmp_phy_init_tbl tbl[],
int num,
@@ -379,15 +379,15 @@ static void qcom_qmp_phy_pcie_msm8996_configure_lane(void __iomem *base,
}
}
-static void qcom_qmp_phy_pcie_msm8996_configure(void __iomem *base,
+static void qmp_pcie_msm8996_configure(void __iomem *base,
const unsigned int *regs,
const struct qmp_phy_init_tbl tbl[],
int num)
{
- qcom_qmp_phy_pcie_msm8996_configure_lane(base, regs, tbl, num, 0xff);
+ qmp_pcie_msm8996_configure_lane(base, regs, tbl, num, 0xff);
}
-static int qcom_qmp_phy_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
+static int qmp_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
{
struct qcom_qmp *qmp = qphy->qmp;
const struct qmp_phy_cfg *cfg = qphy->cfg;
@@ -398,7 +398,7 @@ static int qcom_qmp_phy_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
unsigned int mask, val;
int ret;
- qcom_qmp_phy_pcie_msm8996_configure(serdes, cfg->regs, serdes_tbl, serdes_tbl_num);
+ qmp_pcie_msm8996_configure(serdes, cfg->regs, serdes_tbl, serdes_tbl_num);
qphy_clrbits(serdes, cfg->regs[QPHY_COM_SW_RESET], SW_RESET);
qphy_setbits(serdes, cfg->regs[QPHY_COM_START_CONTROL],
@@ -418,7 +418,7 @@ static int qcom_qmp_phy_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_com_init(struct qmp_phy *qphy)
+static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy)
{
struct qcom_qmp *qmp = qphy->qmp;
const struct qmp_phy_cfg *cfg = qphy->cfg;
@@ -471,7 +471,7 @@ static int qcom_qmp_phy_pcie_msm8996_com_init(struct qmp_phy *qphy)
return ret;
}
-static int qcom_qmp_phy_pcie_msm8996_com_exit(struct qmp_phy *qphy)
+static int qmp_pcie_msm8996_com_exit(struct qmp_phy *qphy)
{
struct qcom_qmp *qmp = qphy->qmp;
const struct qmp_phy_cfg *cfg = qphy->cfg;
@@ -501,21 +501,21 @@ static int qcom_qmp_phy_pcie_msm8996_com_exit(struct qmp_phy *qphy)
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_init(struct phy *phy)
+static int qmp_pcie_msm8996_init(struct phy *phy)
{
struct qmp_phy *qphy = phy_get_drvdata(phy);
struct qcom_qmp *qmp = qphy->qmp;
int ret;
dev_vdbg(qmp->dev, "Initializing QMP phy\n");
- ret = qcom_qmp_phy_pcie_msm8996_com_init(qphy);
+ ret = qmp_pcie_msm8996_com_init(qphy);
if (ret)
return ret;
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_power_on(struct phy *phy)
+static int qmp_pcie_msm8996_power_on(struct phy *phy)
{
struct qmp_phy *qphy = phy_get_drvdata(phy);
struct qcom_qmp *qmp = qphy->qmp;
@@ -528,7 +528,7 @@ static int qcom_qmp_phy_pcie_msm8996_power_on(struct phy *phy)
unsigned int mask, val, ready;
int ret;
- qcom_qmp_phy_pcie_msm8996_serdes_init(qphy);
+ qmp_pcie_msm8996_serdes_init(qphy);
ret = reset_control_deassert(qphy->lane_rst);
if (ret) {
@@ -544,15 +544,15 @@ static int qcom_qmp_phy_pcie_msm8996_power_on(struct phy *phy)
}
/* Tx, Rx, and PCS configurations */
- qcom_qmp_phy_pcie_msm8996_configure_lane(tx, cfg->regs,
- cfg->tx_tbl, cfg->tx_tbl_num, 1);
+ qmp_pcie_msm8996_configure_lane(tx, cfg->regs, cfg->tx_tbl,
+ cfg->tx_tbl_num, 1);
- qcom_qmp_phy_pcie_msm8996_configure_lane(rx, cfg->regs,
- cfg->rx_tbl, cfg->rx_tbl_num, 1);
+ qmp_pcie_msm8996_configure_lane(rx, cfg->regs, cfg->rx_tbl,
+ cfg->rx_tbl_num, 1);
- qcom_qmp_phy_pcie_msm8996_configure(pcs, cfg->regs, cfg->pcs_tbl, cfg->pcs_tbl_num);
+ qmp_pcie_msm8996_configure(pcs, cfg->regs, cfg->pcs_tbl, cfg->pcs_tbl_num);
- qcom_qmp_phy_pcie_msm8996_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl,
+ qmp_pcie_msm8996_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl,
cfg->pcs_misc_tbl_num);
/*
@@ -591,7 +591,7 @@ static int qcom_qmp_phy_pcie_msm8996_power_on(struct phy *phy)
return ret;
}
-static int qcom_qmp_phy_pcie_msm8996_power_off(struct phy *phy)
+static int qmp_pcie_msm8996_power_off(struct phy *phy)
{
struct qmp_phy *qphy = phy_get_drvdata(phy);
const struct qmp_phy_cfg *cfg = qphy->cfg;
@@ -616,43 +616,43 @@ static int qcom_qmp_phy_pcie_msm8996_power_off(struct phy *phy)
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_exit(struct phy *phy)
+static int qmp_pcie_msm8996_exit(struct phy *phy)
{
struct qmp_phy *qphy = phy_get_drvdata(phy);
reset_control_assert(qphy->lane_rst);
- qcom_qmp_phy_pcie_msm8996_com_exit(qphy);
+ qmp_pcie_msm8996_com_exit(qphy);
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_enable(struct phy *phy)
+static int qmp_pcie_msm8996_enable(struct phy *phy)
{
int ret;
- ret = qcom_qmp_phy_pcie_msm8996_init(phy);
+ ret = qmp_pcie_msm8996_init(phy);
if (ret)
return ret;
- ret = qcom_qmp_phy_pcie_msm8996_power_on(phy);
+ ret = qmp_pcie_msm8996_power_on(phy);
if (ret)
- qcom_qmp_phy_pcie_msm8996_exit(phy);
+ qmp_pcie_msm8996_exit(phy);
return ret;
}
-static int qcom_qmp_phy_pcie_msm8996_disable(struct phy *phy)
+static int qmp_pcie_msm8996_disable(struct phy *phy)
{
int ret;
- ret = qcom_qmp_phy_pcie_msm8996_power_off(phy);
+ ret = qmp_pcie_msm8996_power_off(phy);
if (ret)
return ret;
- return qcom_qmp_phy_pcie_msm8996_exit(phy);
+ return qmp_pcie_msm8996_exit(phy);
}
-static int qcom_qmp_phy_pcie_msm8996_vreg_init(struct device *dev, const struct qmp_phy_cfg *cfg)
+static int qmp_pcie_msm8996_vreg_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{
struct qcom_qmp *qmp = dev_get_drvdata(dev);
int num = cfg->num_vregs;
@@ -668,7 +668,7 @@ static int qcom_qmp_phy_pcie_msm8996_vreg_init(struct device *dev, const struct
return devm_regulator_bulk_get(dev, num, qmp->vregs);
}
-static int qcom_qmp_phy_pcie_msm8996_reset_init(struct device *dev, const struct qmp_phy_cfg *cfg)
+static int qmp_pcie_msm8996_reset_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{
struct qcom_qmp *qmp = dev_get_drvdata(dev);
int i;
@@ -689,7 +689,7 @@ static int qcom_qmp_phy_pcie_msm8996_reset_init(struct device *dev, const struct
return 0;
}
-static int qcom_qmp_phy_pcie_msm8996_clk_init(struct device *dev, const struct qmp_phy_cfg *cfg)
+static int qmp_pcie_msm8996_clk_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{
struct qcom_qmp *qmp = dev_get_drvdata(dev);
int num = cfg->num_clks;
@@ -765,9 +765,9 @@ static int phy_pipe_clk_register(struct qcom_qmp *qmp, struct device_node *np)
return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np);
}
-static const struct phy_ops qcom_qmp_phy_pcie_msm8996_ops = {
- .power_on = qcom_qmp_phy_pcie_msm8996_enable,
- .power_off = qcom_qmp_phy_pcie_msm8996_disable,
+static const struct phy_ops qmp_pcie_msm8996_ops = {
+ .power_on = qmp_pcie_msm8996_enable,
+ .power_off = qmp_pcie_msm8996_disable,
.owner = THIS_MODULE,
};
@@ -776,8 +776,7 @@ static void qcom_qmp_reset_control_put(void *data)
reset_control_put(data);
}
-static
-int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np, int id,
+static int qmp_pcie_msm8996_create(struct device *dev, struct device_node *np, int id,
void __iomem *serdes, const struct qmp_phy_cfg *cfg)
{
struct qcom_qmp *qmp = dev_get_drvdata(dev);
@@ -830,7 +829,7 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
if (ret)
return ret;
- generic_phy = devm_phy_create(dev, np, &qcom_qmp_phy_pcie_msm8996_ops);
+ generic_phy = devm_phy_create(dev, np, &qmp_pcie_msm8996_ops);
if (IS_ERR(generic_phy)) {
ret = PTR_ERR(generic_phy);
dev_err(dev, "failed to create qphy %d\n", ret);
@@ -846,16 +845,16 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
return 0;
}
-static const struct of_device_id qcom_qmp_phy_pcie_msm8996_of_match_table[] = {
+static const struct of_device_id qmp_pcie_msm8996_of_match_table[] = {
{
.compatible = "qcom,msm8996-qmp-pcie-phy",
.data = &msm8996_pciephy_cfg,
},
{ },
};
-MODULE_DEVICE_TABLE(of, qcom_qmp_phy_pcie_msm8996_of_match_table);
+MODULE_DEVICE_TABLE(of, qmp_pcie_msm8996_of_match_table);
-static int qcom_qmp_phy_pcie_msm8996_probe(struct platform_device *pdev)
+static int qmp_pcie_msm8996_probe(struct platform_device *pdev)
{
struct qcom_qmp *qmp;
struct device *dev = &pdev->dev;
@@ -887,15 +886,15 @@ static int qcom_qmp_phy_pcie_msm8996_probe(struct platform_device *pdev)
mutex_init(&qmp->phy_mutex);
- ret = qcom_qmp_phy_pcie_msm8996_clk_init(dev, cfg);
+ ret = qmp_pcie_msm8996_clk_init(dev, cfg);
if (ret)
return ret;
- ret = qcom_qmp_phy_pcie_msm8996_reset_init(dev, cfg);
+ ret = qmp_pcie_msm8996_reset_init(dev, cfg);
if (ret)
return ret;
- ret = qcom_qmp_phy_pcie_msm8996_vreg_init(dev, cfg);
+ ret = qmp_pcie_msm8996_vreg_init(dev, cfg);
if (ret) {
if (ret != -EPROBE_DEFER)
dev_err(dev, "failed to get regulator supplies: %d\n",
@@ -915,7 +914,7 @@ static int qcom_qmp_phy_pcie_msm8996_probe(struct platform_device *pdev)
id = 0;
for_each_available_child_of_node(dev->of_node, child) {
/* Create per-lane phy */
- ret = qcom_qmp_phy_pcie_msm8996_create(dev, child, id, serdes, cfg);
+ ret = qmp_pcie_msm8996_create(dev, child, id, serdes, cfg);
if (ret) {
dev_err(dev, "failed to create lane%d phy, %d\n",
id, ret);
@@ -945,15 +944,15 @@ static int qcom_qmp_phy_pcie_msm8996_probe(struct platform_device *pdev)
return ret;
}
-static struct platform_driver qcom_qmp_phy_pcie_msm8996_driver = {
- .probe = qcom_qmp_phy_pcie_msm8996_probe,
+static struct platform_driver qmp_pcie_msm8996_driver = {
+ .probe = qmp_pcie_msm8996_probe,
.driver = {
.name = "qcom-qmp-msm8996-pcie-phy",
- .of_match_table = qcom_qmp_phy_pcie_msm8996_of_match_table,
+ .of_match_table = qmp_pcie_msm8996_of_match_table,
},
};
-module_platform_driver(qcom_qmp_phy_pcie_msm8996_driver);
+module_platform_driver(qmp_pcie_msm8996_driver);
MODULE_AUTHOR("Vivek Gautam <vivek.gautam@codeaurora.org>");
MODULE_DESCRIPTION("Qualcomm QMP MSM8996 PCIe PHY driver");
--
2.35.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2022-09-07 11:08 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 11:07 [PATCH 00/16] phy: qcom-qmp: further clean ups Johan Hovold
2022-09-07 11:07 ` [PATCH 01/16] phy: qcom-qmp-combo: disable runtime PM on unbind Johan Hovold
2022-09-09 9:26 ` Dmitry Baryshkov
2022-09-09 13:22 ` Johan Hovold
2022-09-07 11:07 ` [PATCH 02/16] phy: qcom-qmp-combo: drop unused defines Johan Hovold
2022-09-09 9:21 ` Dmitry Baryshkov
2022-09-09 13:20 ` Johan Hovold
2022-09-09 14:27 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 03/16] phy: qcom-qmp-pcie: drop unused runtime PM implementation Johan Hovold
2022-09-09 9:36 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 04/16] phy: qcom-qmp-pcie: drop unused defines Johan Hovold
2022-09-09 9:37 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 05/16] phy: qcom-qmp-pcie-msm8996: drop unused runtime PM implementation Johan Hovold
2022-09-09 9:37 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 06/16] phy: qcom-qmp-pcie-msm8996: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 07/16] phy: qcom-qmp-ufs: drop unused runtime PM implementation Johan Hovold
2022-09-09 9:38 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 08/16] phy: qcom-qmp-ufs: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 09/16] phy: qcom-qmp-usb: disable runtime PM on unbind Johan Hovold
2022-09-09 9:45 ` Dmitry Baryshkov
2022-09-09 13:23 ` Johan Hovold
2022-09-07 11:07 ` [PATCH 10/16] phy: qcom-qmp-usb: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 11/16] phy: qcom-qmp: silence noisy probe Johan Hovold
2022-09-09 9:46 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 12/16] phy: qcom-qmp-combo: shorten function prefixes Johan Hovold
2022-09-09 9:46 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 13/16] phy: qcom-qmp-pcie-msm8996: drop unused secondary init tables Johan Hovold
2022-09-09 9:47 ` Dmitry Baryshkov
2022-09-07 11:07 ` Johan Hovold [this message]
2022-09-09 9:47 ` [PATCH 14/16] phy: qcom-qmp-pcie-msm8996: shorten function prefixes Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 15/16] phy: qcom-qmp-ufs: " Johan Hovold
2022-09-09 9:47 ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 16/16] phy: qcom-qmp-usb: " Johan Hovold
2022-09-09 9:48 ` Dmitry Baryshkov
2022-09-09 13:27 ` Johan Hovold
2022-09-20 5:58 ` [PATCH 00/16] phy: qcom-qmp: further clean ups Vinod Koul
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=20220907110728.19092-15-johan+linaro@kernel.org \
--to=johan+linaro@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=kishon@ti.com \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.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).