mbox series

[v2,0/3] clk: add api to get clk consumer from clk_hw

Message ID 20201021162147.563655-1-jbrunet@baylibre.com (mailing list archive)
Headers show
Series clk: add api to get clk consumer from clk_hw | expand

Message

Jerome Brunet Oct. 21, 2020, 4:21 p.m. UTC
This patchset a call in CCF to get "struct clk*" from "struct clk_hw*"

Changes since v1: [0]
* Add a con_id string to help keep track of the consumer
* Add devm variant:
 - Following our discussion on V1, I choose to have the dev as
   argument as most devm function do. However, as Stephen pointed out
   we don't expect this to differ from the one linked to clk_hw. In
   this case a warning is thrown.
* Add a first usage of this in the amlogic clock driver.

[0]: https://lore.kernel.org/r/20200519170440.294601-1-jbrunet@baylibre.com

Jerome Brunet (3):
  clk: avoid devm_clk_release name clash
  clk: add api to get clk consumer from clk_hw
  clk: meson: g12: drop use of __clk_lookup()

 drivers/clk/clk.c            | 73 +++++++++++++++++++++++++++++++++---
 drivers/clk/meson/g12a.c     | 68 ++++++++++++++++-----------------
 include/linux/clk-provider.h |  5 +++
 3 files changed, 104 insertions(+), 42 deletions(-)

Comments

Kevin Hilman Oct. 26, 2020, 4:11 p.m. UTC | #1
Jerome Brunet <jbrunet@baylibre.com> writes:

> This patchset a call in CCF to get "struct clk*" from "struct clk_hw*"
>
> Changes since v1: [0]
> * Add a con_id string to help keep track of the consumer
> * Add devm variant:
>  - Following our discussion on V1, I choose to have the dev as
>    argument as most devm function do. However, as Stephen pointed out
>    we don't expect this to differ from the one linked to clk_hw. In
>    this case a warning is thrown.
> * Add a first usage of this in the amlogic clock driver.

Tested-by: Kevin Hilman <khilman@baylibre.com>

Tested this on a couple g12a based platforms.  This series also allows
me to build the g12 clock drivers as modules.

Kevin