linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: kholk11@gmail.com
Cc: agross@kernel.org, sboyd@kernel.org, marijns95@gmail.com,
	konradybcio@gmail.com, martin.botka1@gmail.com,
	linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver
Date: Fri, 4 Dec 2020 22:59:52 -0600	[thread overview]
Message-ID: <X8sTyHGhYeCpqQ/B@builder.lan> (raw)
In-Reply-To: <20200926130306.13843-2-kholk11@gmail.com>

On Sat 26 Sep 08:03 CDT 2020, kholk11@gmail.com wrote:
> diff --git a/drivers/clk/qcom/mmcc-sdm660.c b/drivers/clk/qcom/mmcc-sdm660.c
[..]
> +static int mmcc_660_probe(struct platform_device *pdev)
> +{
> +	struct regmap *regmap;
> +	bool is_sdm630 = 0;

This shouldn't be 0, but there's no need for initializing it either, as
the first reference is an assignment. On the other hand, you could
without loss of clarity just move the of_device_is_compatible() into the
if statement directly.

> +
> +	regmap = qcom_cc_map(pdev, &mmcc_660_desc);
> +	if (IS_ERR(regmap))
> +		return PTR_ERR(regmap);
> +
> +	is_sdm630 = of_device_is_compatible(pdev->dev.of_node,
> +					    "qcom,mmcc-sdm630");
> +
> +	clk_alpha_pll_configure(&mmpll3, regmap, &mmpll3_config);
> +	clk_alpha_pll_configure(&mmpll4, regmap, &mmpll4_config);
> +	clk_alpha_pll_configure(&mmpll5, regmap, &mmpll5_config);
> +	clk_alpha_pll_configure(&mmpll7, regmap, &mmpll7_config);
> +	clk_alpha_pll_configure(&mmpll8, regmap, &mmpll8_config);
> +	clk_alpha_pll_configure(&mmpll10, regmap, &mmpll10_config);
> +
> +	if (is_sdm630) {
> +		mmcc_660_desc.clks[BYTE1_CLK_SRC] = 0;
> +		mmcc_660_desc.clks[MDSS_BYTE1_CLK] = 0;
> +		mmcc_660_desc.clks[MDSS_BYTE1_INTF_DIV_CLK] = 0;
> +		mmcc_660_desc.clks[MDSS_BYTE1_INTF_CLK] = 0;
> +		mmcc_660_desc.clks[ESC1_CLK_SRC] = 0;
> +		mmcc_660_desc.clks[MDSS_ESC1_CLK] = 0;
> +		mmcc_660_desc.clks[PCLK1_CLK_SRC] = 0;
> +		mmcc_660_desc.clks[MDSS_PCLK1_CLK] = 0;
> +	}
> +
> +	return qcom_cc_really_probe(pdev, &mmcc_660_desc, regmap);
> +}
> +
> +static struct platform_driver mmcc_660_driver = {
> +	.probe		= mmcc_660_probe,
> +	.driver		= {
> +		.name	= "mmcc-sdm660",
> +		.of_match_table = mmcc_660_match_table,
> +	},
> +};
> +
> +static int __init mmcc_660_init(void)
> +{
> +	return platform_driver_register(&mmcc_660_driver);
> +}
> +core_initcall_sync(mmcc_660_init);
> +
> +static void __exit mmcc_660_exit(void)
> +{
> +	platform_driver_unregister(&mmcc_660_driver);
> +}
> +module_exit(mmcc_660_exit);
> +

The driver is tristate (which is correct), but for that you need a
MODULE_LICENSE at least.

> diff --git a/include/dt-bindings/clock/qcom,mmcc-sdm660.h b/include/dt-bindings/clock/qcom,mmcc-sdm660.h

Please move this to the dt-binding patch, and reorder the two.

> new file mode 100644
> index 000000000000..f9dbc21cb5c7
> --- /dev/null
> +++ b/include/dt-bindings/clock/qcom,mmcc-sdm660.h
> @@ -0,0 +1,162 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

And please make this "GPL-2.0-only OR BSD-2-Clause".

Regards,
Bjorn

  parent reply	other threads:[~2020-12-05  5:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26 13:03 [PATCH 0/5] SDM630/660 Multimedia and GPU clock controllers kholk11
2020-09-26 13:03 ` [PATCH 1/5] clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver kholk11
2020-09-26 13:23   ` Martin Botka
2020-09-30 20:47   ` kernel test robot
2020-10-13 14:51     ` Martin Botka
2020-10-13 15:01       ` Martin Botka
2020-12-05  4:59   ` Bjorn Andersson [this message]
2020-09-26 13:03 ` [PATCH 2/5] dt-bindings: clock: Add support for the SDM630 and SDM660 mmcc kholk11
2020-09-26 13:03 ` [PATCH 3/5] clk: qcom: mmcc-sdm660: Add MDP clock source CXC to MDSS GDSC kholk11
2020-12-05  5:08   ` Bjorn Andersson
2021-01-09 18:39     ` AngeloGioacchino Del Regno
2020-09-26 13:03 ` [PATCH 4/5] clk: qcom: Add SDM660 GPU Clock Controller (GPUCC) driver kholk11
2020-09-26 13:29   ` Martin Botka
2020-09-30 20:46   ` kernel test robot
2020-09-30 21:58     ` AngeloGioacchino Del Regno
2020-10-02  5:39       ` Philip Li
2020-12-05  5:16   ` Bjorn Andersson
2020-09-26 13:03 ` [PATCH 5/5] dt-bindings: clock: Add QCOM SDM630 and SDM660 graphics clock bindings kholk11
2020-09-26 13:30   ` Martin Botka
2020-12-05  5:14   ` Bjorn Andersson
2020-12-04 18:16 ` [PATCH 0/5] SDM630/660 Multimedia and GPU clock controllers AngeloGioacchino Del Regno

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=X8sTyHGhYeCpqQ/B@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=kholk11@gmail.com \
    --cc=konradybcio@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=sboyd@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).