From: Krzysztof Kozlowski <krzk@kernel.org>
To: dongxuyang@eswincomputing.com, mturquette@baylibre.com,
sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ningyu@eswincomputing.com, linmin@eswincomputing.com,
huangyifeng@eswincomputing.com
Subject: Re: [PATCH v3 2/2] clock: eswin: Add eic7700 clock driver
Date: Tue, 24 Jun 2025 13:04:09 +0200 [thread overview]
Message-ID: <420cc724-e6cf-42d9-b00b-558965bee085@kernel.org> (raw)
In-Reply-To: <20250624103314.400-1-dongxuyang@eswincomputing.com>
On 24/06/2025 12:33, dongxuyang@eswincomputing.com wrote:
> From: Xuyang Dong <dongxuyang@eswincomputing.com>
>
> This driver depends on the CCF framework implementation.
> Based on this driver, other modules in the SoC can use the APIs
> provided by CCF to perform clock-related operations.
> The driver supports eic7700 series chips.
>
> Signed-off-by: Yifeng Huang <huangyifeng@eswincomputing.com>
> Signed-off-by: Xuyang Dong <dongxuyang@eswincomputing.com>
> ---
> drivers/clk/Kconfig | 1 +
> drivers/clk/Makefile | 1 +
> drivers/clk/eswin/Kconfig | 10 +
> drivers/clk/eswin/Makefile | 8 +
> drivers/clk/eswin/clk-eic7700.c | 3809 +++++++++++++++++++++++++++++++
> drivers/clk/eswin/clk-eic7700.h | 194 ++
...
> +void eswin_clk_register_pll(struct eswin_pll_clock *clks, int nums,
> + struct eswin_clock_data *data, struct device *dev)
> +{
> + void __iomem *base = data->base;
> + struct eswin_clk_pll *p_clk = NULL;
> + struct clk *clk = NULL;
> + struct clk_init_data init;
> + int i;
> + static struct gpio_desc *cpu_voltage_gpio;
> +
> + p_clk = devm_kzalloc(dev, sizeof(*p_clk) * nums, GFP_KERNEL);
> +
> + if (!p_clk)
> + return;
> + /*
> + *In the D2D system, the boost operation is performed using the GPIO on Die0.
What is the Linux coding style of comment?
> + *However, the same GPIO pin cannot be acquired twice, so special handling is implemented:
> + *Once the GPIO is acquired,the other driver simply uses it directly
> + */
> + cpu_voltage_gpio =
> + IS_ERR_OR_NULL(cpu_voltage_gpio) ?
> + devm_gpiod_get(dev, "cpu-voltage", GPIOD_OUT_HIGH) :
> + cpu_voltage_gpio;
> + if (IS_ERR_OR_NULL(cpu_voltage_gpio)) {
> + dev_warn(dev, "failed to get cpu volatge gpio\n");
> + cpu_voltage_gpio = NULL;
> + } else {
> + /*cpu default freq is 1400M, the volatge should be VOLTAGE_0_8V*/
> + eswin_clk_set_cpu_volatge(cpu_voltage_gpio, VOLTAGE_0_8V);
Amount of typos and unreadable stuff like missing spaces in this driver
is just discouraging and making review unnecessary difficult. Fix the
typos, fix the style. Driver is also way too big for simple clock driver
and I am surprised to see so many redundancies.
Anyway, your binding said it is not 1400M but something else so this is
a mess.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-06-24 11:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 10:32 [PATCH v3 0/2] Add driver support for ESWIN eic700 SoC clock controller dongxuyang
2025-06-24 10:32 ` [PATCH v3 1/2] dt-bindings: clock: eswin: Documentation for eic7700 SoC dongxuyang
2025-06-24 11:00 ` Krzysztof Kozlowski
2025-06-25 6:07 ` Krzysztof Kozlowski
2025-06-24 10:33 ` [PATCH v3 2/2] clock: eswin: Add eic7700 clock driver dongxuyang
2025-06-24 11:04 ` Krzysztof Kozlowski [this message]
2025-07-04 9:46 ` 董绪洋
2025-07-07 9:12 ` Bo Gan
2025-07-08 9:09 ` Xuyang Dong
2025-07-09 22:52 ` Bo Gan
2025-07-10 0:52 ` Xuyang Dong
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=420cc724-e6cf-42d9-b00b-558965bee085@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dongxuyang@eswincomputing.com \
--cc=huangyifeng@eswincomputing.com \
--cc=krzk+dt@kernel.org \
--cc=linmin@eswincomputing.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ningyu@eswincomputing.com \
--cc=robh@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).