[lkml]   [2019]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/9] Rewrite clk parent handling
There are a couple problems with clk parent handling in the common clk
framework. This patch series combines a few different topics together as
all this code is closely related.

First off, we don't do well at determining parents of clks at clk
registration time because the return type of the clk_ops::get_parent()
op is a u8 which isn't expressive enough to cover all our use-cases.

Secondly, 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.

Thirdly, clkdev.c has a collection of DT parsing logic in it that is
only used when the common clk framework is present but we want to use
that same logic for describing parent-child linkages of clk providers
via in DT. This should all be moved into the common clk framework and
used from there as well as from clkdev.c, so this series changes the way
clkdev interacts with the clk framework by having clkdev get clk_hw
pointers out of DT clk specifiers and then convert those into clk
pointers with clk_hw_create_clk(). Splitting the API this way lets us
get clk_hw pointers for clk providers and skip the struct clk pointer
creation phase that we don't need to do when describing parent-child

And finally, we have a few patches in here that lay the groundwork for
supporting device links in the common clk framework. We do that by
pushing the consuming device pointer through to the clk pointer creation
in clk_hw_create_clk(). This wasn't always easy to do when we had
__clk_create_clk() called from multiple places, some being deep in the
clk registration path. This series simplifies that logic so that we can
always attach a consumer device to a clk that we create in one place,
instead of making that linkage in multiple places near where we create
struct clk pointers.

Miquel Raynal (1):
clk: core: clarify the check for runtime PM

Stephen Boyd (8):
clk: Combine __clk_get() and __clk_create_clk()
clk: Introduce get_parent_hw clk op
clk: Introduce of_clk_get_hw_from_clkspec()
clk: Inform the core about consumer devices
clk: Move of_clk_*() APIs into clk.c from clkdev.c
clk: Allow parents to be specified without string names
clk: qcom: gcc-sdm845: Migrate to DT parent mapping
arm64: dts: qcom: Specify XO clk as input to GCC node

Cc: Miquel Raynal <>
Cc: Jerome Brunet <>
Cc: Russell King <>
Cc: Michael Turquette <>

arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +
drivers/clk/clk.c | 584 ++++++++++++++++++++-------
drivers/clk/clk.h | 23 +-
drivers/clk/clkdev.c | 120 +-----
drivers/clk/qcom/gcc-sdm845.c | 180 ++++-----
include/linux/clk-provider.h | 26 +-
6 files changed, 583 insertions(+), 352 deletions(-)

base-commit: 651022382c7f8da46cb4872a545ee1da6d097d2a
Sent by a computer through tubes

 \ /
  Last update: 2019-01-29 07:11    [W:0.166 / U:10.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site