clk: of: add helper function to fill parent clock array
Status from this message: Applied to clk-next with some small kernel-doc fixes.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesApplied
- v12 patches 3 repliesSuperseded
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | clk: of: helper for filling parent clock array and return num of parentsdrivers/ include/ | +21 | 1 reply | |
| 2/2 | clk: socfpga: make use of of_clk_parent_fill helper functiondrivers/ drivers/ | +2 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCHv3 0/2] clk: of: add helper function to fill parent clock array
From: Dinh Nguyen <[email protected]>
Hi,
As suggested by Stephen Boyd, this patch adds a helper function that will fill the parent clock array.
Since the following code is sprinkled all over the platform clock drivers:
for (i = 0; i < num_parents; ++i)
parent_names[i] = of_clk_get_parent_name(np, i);
The above code can be replace by of_clk_parent_fill(). And since the logic of the of_clk_parent_fill is to walk the clock node to find the parent, it is easy to just return the number of parents as well.
The second patch makes use of the new helper function in the SoCFPGA platform. If this patch is accepted, I can go through and replace the other platforms after that.
v3: shorten and clean up function comment, use EXPORT_SYMBOL_GPL
v2: use unsigned int for size
Thanks,
Dinh Nguyen (2):
clk: of: helper for filling parent clock array and return num of
parents
clk: socfpga: make use of of_clk_parent_fill helper function
drivers/clk/clk.c | 20 ++++++++++++++++++++ drivers/clk/socfpga/clk-gate.c | 6 +----- drivers/clk/socfpga/clk-pll.c | 7 +------ include/linux/clk-provider.h | 1 + 4 files changed, 23 insertions(+), 11 deletions(-)
Signature · 1 line
2.2.1