lkml.org 
[lkml]   [2022]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v7 06/10] clk: Add Sunplus SP7021 clock driver
Date
> > +
> > +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.
\
 
 \ /
  Last update: 2022-01-07 09:03    [W:0.061 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site