lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51a2cbddc978400086271fc735493566@cqplus1.com>
Date:   Fri, 7 Jan 2022 07:55:18 +0000
From:   qinjian[覃健] <qinjian@...lus1.com>
To:     Stephen Boyd <sboyd@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
CC:     "mturquette@...libre.com" <mturquette@...libre.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "maz@...nel.org" <maz@...nel.org>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "stefan.wahren@...e.com" <stefan.wahren@...e.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        Wells Lu 呂芳騰 <wells.lu@...plus.com>
Subject: RE: [PATCH v7 06/10] clk: Add Sunplus SP7021 clock driver

> > +
> > +CLK_OF_DECLARE_DRIVER(sp_clkc, "sunplus,sp7021-clkc", sp_clk_setup);
> 
> Why CLK_OF_DECLARE_DRIVER? There should be a comment but better would be
> to make a platform driver instead. If the platform driver can't be used,
> we need to know what other device driver is probing based on this clkc
> compatible string.

Dear Stephen,

Sorry, I don't understand your comment.
Did you mean, like below:

static int sp7021_clk_probe(struct platform_device *pdev)
{
	......
	sp_clk_data->num = CLK_MAX;
	return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, sp_clk_data);
}

static const struct of_device_id sp7021_clk_dt_ids[] = {
	{ .compatible = "sunplus,sp7021-clkc", },
	{ }
};
MODULE_DEVICE_TABLE(of, sp7021_clk_dt_ids);

static struct platform_driver sp7021_clk_driver = {
	.probe  = sp7021_clk_probe,
	.driver = {
		.name = "sp7021-clk",
		.of_match_table = sp7021_clk_dt_ids,
	},
};
builtin_platform_driver(sp7021_clk_driver);


But, It's doesn't work. 
Most other clk drivers used CLK_OF_DECLARE_DRIVER or CLK_OF_DECLARE.
I just take these as the reference and it's working.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ