Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1466620
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 1/2] clk: uniphier: add core support code for UniPhier clock driver |
| Date | 2016-08-19 21:20 +0200 |
| Message-ID | <s7XuF-1cK-9@gated-at.bofh.it> (permalink) |
| References | <s1zv3-7Qw-7@gated-at.bofh.it> <s1zEJ-7Ue-15@gated-at.bofh.it> <s7GtQ-7go-35@gated-at.bofh.it> <s7W5A-aY-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/20, Masahiro Yamada wrote:
> 2016-08-19 9:25 GMT+09:00 Stephen Boyd <sboyd@codeaurora.org>:
> >> +{
> >> + struct device *dev = &pdev->dev;
> >> + const struct of_device_id *match;
> >> + struct clk_hw_onecell_data *hw_data;
> >> + struct device_node *parent;
> >> + struct regmap *regmap;
> >> + const struct uniphier_clk_data *p;
> >> + int clk_num = 0;
> >> +
> >> + match = of_match_node(uniphier_clk_match, dev->of_node);
> >> + if (!match)
> >> + return -ENODEV;
> >
> > We can use of_driver_match_device() to make this simpler.
>
>
> I want to use the returned "match".
> The of_driver_match_device() just checks if it matches or not,
> so I do not think it can be the replacement.
>
> I can use of_match_device() instead, if you like.
Sorry I meant of_device_get_match_data().
>
>
>
> >> +
> >> + parent = of_get_parent(dev->of_node); /* parent should be syscon node */
> >> + regmap = syscon_node_to_regmap(parent);
> >> + of_node_put(parent);
> >
> > devm_get_regmap(dev->parent) should work then? Why do we need to
> > use OF APIs?
>
> "git grep devm_get_regmap" did not hit anything.
>
> Where is it defined?
>
Sorry I meant dev_get_regmap().
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v6 1/2] clk: uniphier: add core support code for UniPhier clock driver Stephen Boyd <sboyd@codeaurora.org> - 2016-08-19 03:10 +0200
Re: [PATCH v6 1/2] clk: uniphier: add core support code for UniPhier clock driver Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-19 19:50 +0200
Re: [PATCH v6 1/2] clk: uniphier: add core support code for UniPhier clock driver Stephen Boyd <sboyd@codeaurora.org> - 2016-08-19 21:20 +0200
csiph-web