public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yu-Chun Lin [林祐君]" <eleanor.lin@realtek.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "mturquette@baylibre.com" <mturquette@baylibre.com>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"Edgar Lee [李承諭]" <cylee12@realtek.com>,
	"Jyan Chou [周芷安]" <jyanchou@realtek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"James Tai [戴志峰]" <james.tai@realtek.com>,
	"CY_Huang[黃鉦晏]" <cy.huang@realtek.com>,
	"Stanley Chang[昌育德]" <stanley_chang@realtek.com>
Subject: RE: [PATCH 2/9] clk: realtek: Add basic reset support
Date: Fri, 2 Jan 2026 05:56:02 +0000	[thread overview]
Message-ID: <44e84af7d4564cebab1ff285b74faf53@realtek.com> (raw)
In-Reply-To: <20251230-impetuous-quizzical-locust-daffda@quoll>

> On Mon, Dec 29, 2025 at 03:53:06PM +0800, Yu-Chun Lin wrote:
> > +
> > +int rtk_reset_controller_add(struct device *dev,
> > +                          struct rtk_reset_initdata *initdata) {
> > +     struct rtk_reset_data *data;
> > +
> > +     data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> > +
> 
> What sort of coding style do you use? There is absolutely never a blank line
> between kzalloc and the if().
> 

Will remove the blank line.

> > +     if (!data)
> > +             return -ENOMEM;
> > +
> > +     data->dev = dev;
> > +     data->num_banks = initdata->num_banks;
> > +     data->banks = initdata->banks;
> > +     data->regmap = initdata->regmap;
> > +     data->rcdev.owner = THIS_MODULE;
> 
> THIS_MODULE? so which module is exactly the owner - clk-rtk.ko or actual
> driver?
> 
> This feels buggy, but I did not check your Makefile.
> 

The reset support and the clock driver are designed to be linked together into
a single kernel module (clk-rtk.ko). Therefore, THIS_MODULE is the correct owner.

> > +     data->rcdev.ops = &rtk_reset_ops;
> > +     data->rcdev.dev = dev;
> > +     data->rcdev.of_node = dev->of_node;
> > +     data->rcdev.nr_resets = initdata->num_banks * 0x100;
> > +     data->rcdev.of_xlate = rtk_of_reset_xlate;
> > +     data->rcdev.of_reset_n_cells = 1;
> > +
> > +     return devm_reset_controller_register(dev, &data->rcdev); }
> > +EXPORT_SYMBOL_GPL(rtk_reset_controller_add);
> > +
> > diff --git a/drivers/clk/realtek/reset.h b/drivers/clk/realtek/reset.h
> > new file mode 100644 index 000000000000..cd446b098429
> > --- /dev/null
> > +++ b/drivers/clk/realtek/reset.h
> > @@ -0,0 +1,36 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Copyright (C) 2019 Realtek Semiconductor Corporation
> 
> Ah, so that's why you sent probe() from ~10 years ago...
> 
> Best regards,
> Krzysztof


  reply	other threads:[~2026-01-02  5:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29  7:53 [PATCH 0/9] clk: realtek: Add RTD1625 Clock Support Yu-Chun Lin
2025-12-29  7:53 ` [PATCH 1/9] dt-bindings: clock: Add Realtek RTD1625 Clock & Reset Controller Yu-Chun Lin
2025-12-30 12:11   ` Krzysztof Kozlowski
2026-01-02  5:46     ` Yu-Chun Lin [林祐君]
2025-12-29  7:53 ` [PATCH 2/9] clk: realtek: Add basic reset support Yu-Chun Lin
2025-12-30 12:20   ` Krzysztof Kozlowski
2026-01-02  5:56     ` Yu-Chun Lin [林祐君] [this message]
2025-12-29  7:53 ` [PATCH 3/9] clk: realtek: Introduce a common probe() Yu-Chun Lin
2025-12-30 12:17   ` Krzysztof Kozlowski
2025-12-30 18:03   ` kernel test robot
2025-12-30 18:14   ` kernel test robot
2025-12-29  7:53 ` [PATCH 4/9] clk: realtek: Add support for phase locked loops (PLLs) Yu-Chun Lin
2025-12-30 20:18   ` kernel test robot
2025-12-29  7:53 ` [PATCH 5/9] clk: realtek: Add support for gate clock Yu-Chun Lin
2025-12-29  7:53 ` [PATCH 6/9] clk: realtek: Add support for mux clock Yu-Chun Lin
2026-01-05 12:04   ` Dan Carpenter
2025-12-29  7:53 ` [PATCH 7/9] clk: realtek: Add support for MMC-tuned PLL clocks Yu-Chun Lin
2025-12-29  7:53 ` [PATCH 8/9] clk: realtek: Add RTD1625-CRT clock controller driver Yu-Chun Lin
2025-12-30 12:15   ` Krzysztof Kozlowski
2025-12-29  7:53 ` [PATCH 9/9] clk: realtek: Add RTD1625-ISO " Yu-Chun Lin

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=44e84af7d4564cebab1ff285b74faf53@realtek.com \
    --to=eleanor.lin@realtek.com \
    --cc=conor+dt@kernel.org \
    --cc=cy.huang@realtek.com \
    --cc=cylee12@realtek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=james.tai@realtek.com \
    --cc=jyanchou@realtek.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=stanley_chang@realtek.com \
    /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