RE: [PATCH v11 09/11] clk: realtek: Add RTD1625-CRT clock controller driver

Yu-Chun Lin [林祐君] <[email protected]> Fri, 31 Jul 2026 08:17:44 +0000
Newsgroups org.kernel.vger.linux-clk,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Brian,

> Hi Yu-Chun,
> 
> On Tue, Jul 28, 2026 at 10:28:04PM +0800, Yu-Chun Lin wrote:
> > From: Cheng-Yu Lee <[email protected]>
> >

(...)

> > +
> > +static int rtd1625_crt_probe(struct platform_device *pdev) {
> > +     const struct rtk_clk_desc *desc;
> > +
> > +     desc = of_device_get_match_data(&pdev->dev);
> 
> of_device_get_match_data() is deprecated. Use
> device_get_match_data(&pdev->dev) instead. You should be able to drop the
> linux/of_device.h include at the top.
> 

Ack.

> 
> > +     if (!desc)
> > +             return -EINVAL;
> > +
> > +     return rtk_clk_probe(pdev, desc); }
> > +
> > +static const struct of_device_id rtd1625_crt_match[] = {
> > +     {.compatible = "realtek,rtd1625-crt-clk", .data =
> > +&rtd1625_crt_desc,},
> 
> Add a space after the { and before the ending }.
> 

Ack.

> > +     { /* sentinel */ }
> > +};
> > +MODULE_DEVICE_TABLE(of, rtd1625_crt_match);
> > +
> > +static struct platform_driver rtd1625_crt_driver = {
> > +     .probe = rtd1625_crt_probe,
> > +     .driver = {
> > +             .name = "rtk-rtd1625-crt-clk",
> > +             .of_match_table = rtd1625_crt_match,
> > +             .suppress_bind_attrs = true,
> 
> This driver is listed as a tristate in the Kconfig but then you have this. Is the
> intention of this driver to be built in only?
> 

I will change the Kconfig options for this driver, as well as the related
config, from tristate to bool.

> > +     },
> > +};
> > +
> > +static int __init rtd1625_crt_init(void) {
> > +     return platform_driver_register(&rtd1625_crt_driver);
> > +}
> > +subsys_initcall(rtd1625_crt_init);
> 
> Is there a reason that you can't use module_platform_driver() to have this
> registered at the device_initcall level?
> 
> Brian

No specific reason. I will change it to use module_platform_driver() to
take advantage of the deferred probe mechanism.

Thank you for reviewing.

Best Regards,
Yu-Chun