Skip to content

Rewrite clk parent handling

Stephen Boyd linux-clk lkml 4 versions – Applied

Status from this message: Applied to clk-fixes

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 15 repliesApplied
  2. v37 patches 15 repliesSuperseded
  3. v28 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches19 repliesSuperseded

Changes in v4 from the cover letter

* Split clkdev patch into two
* New patch to let dev_of_node() accept NULL
* Use dev_of_node() in of_clk_hw_register() to avoid NULL deref

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/9clkdev: Hold clocks_mutex while iterating clocks listdrivers/clk/clkdev.c+5 -02 replies
2/9clkdev: Move clk creation outside of 'clocks_mutex'drivers/clk/clkdev.c+13 -121 reply
3/9clk: Prepare for clk registration API that uses DT nodesdrivers/clk/clk.c+18 -131 reply
4/9driver core: Let dev_of_node() accept a NULL devinclude/linux/device.h+1 -12 replies
5/9clk: Add of_clk_hw_register() API for early clk driversdrivers/clk/clk.c include/linux/clk-provider.h+24 -31 reply
6/9clk: Allow parents to be specified without string namesdrivers/clk/clk.c include/linux/clk-provider.h+219 -621 reply
7/9clk: Look for parents with clkdev based clk_lookupsdrivers/clk/clk.c drivers/clk/clk.h drivers/clk/clkdev.c+21 -101 reply
8/9clk: Allow parents to be specified via clkspec indexdrivers/clk/clk.c include/linux/clk-provider.h+13 -71 reply
9/9clk: fixed-factor: Let clk framework find parentdrivers/clk/clk-fixed-factor.c+33 -204 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchMatti VaittinenJeffrey HugoGreg Kroah-Hartman
SeriesT-b
1/9A-b
2/9
3/9
4/9A-b
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/9] Rewrite clk parent handling

There are a couple warts with clk parent handling in the common clk framework. This patch series addresses one of those warts, parent-child linkages. We use strings for all parent-child linkages, and this leads to poorly written code that extracts clk names from struct clk pointers and makes clk provider drivers use clk consumer APIs. I've converted the fixed factor clk and I'm looking at converting users of other "basic" clk types in follow-up patches so we can start moving drivers away from string matching in the clk namespace.

Changes from v3:
* Split clkdev patch into two
* New patch to let dev_of_node() accept NULL
* Use dev_of_node() in of_clk_hw_register() to avoid NULL deref

Changes from v2:
* Dropped patches that got merged into v5.1-rc1
* Introduced a new function of_clk_hw_register()
* Introduced 'index' into clk_parent_data structure
* Converted fixed-factor basic type to new design
* Fixed some bugs in a recent patch to clkdev, leading to an essential API for clkdev based lookups working

Changes from v1:
* Dropped new get_parent_hw, we'll pick it up in a later series
* Rebased to v5.0-rc6 to avoid conflicts with clk-fixes
* Renamed 'fallback' to 'name' and 'name' to 'fw_name' in parent map
* Made sure that clk_hw_get_parent_by_index() never sees an error pointer so that we don't mistakenly try to defer an error pointer
* Fixed index passing mistake on of_clk_get_hw_from_clkspec()
* Copy over all the data from parent maps and free it correctly too

Cc Chen-Yu Tsai <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jeffrey Hugo <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Matti Vaittinen <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Rob Herring <[email protected]>
Cc Russell King <[email protected]>

Stephen Boyd (9):
clkdev: Hold clocks_mutex while iterating clocks list
clkdev: Move clk creation outside of 'clocks_mutex'
clk: Prepare for clk registration API that uses DT nodes driver core: Let dev_of_node() accept a NULL dev
clk: Add of_clk_hw_register() API for early clk drivers
clk: Allow parents to be specified without string names
clk: Look for parents with clkdev based clk_lookups
clk: Allow parents to be specified via clkspec index
clk: fixed-factor: Let clk framework find parent

 drivers/clk/clk-fixed-factor.c |  53 ++++--
 drivers/clk/clk.c              | 326 +++++++++++++++++++++++++--------
 drivers/clk/clk.h              |   2 +
 drivers/clk/clkdev.c           |  30 +--
 include/linux/clk-provider.h   |  22 +++
 include/linux/device.h         |   2 +-
 6 files changed, 327 insertions(+), 108 deletions(-)

base-commit: 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b

Signature · 1 line
Sent by a computer through tubes