lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] clk: core: link consumer with clock driver
Hi Stephen,

Stephen Boyd <sboyd@kernel.org> wrote on Fri, 30 Nov 2018 01:26:20
-0800:

> Quoting Miquel Raynal (2018-11-23 01:11:32)
> > Would you agree with me adding dummy functions in the #else section
> > like:
> >
> > static inline void __clk_device_link(struct device *consumer, struct clk *clk)
> > {
> > return;
> > }
> >
> > static inline void __clk_device_unlink(struct clk *clk)
> > {
> > return;
> > }
> >
> > Do you want me to also declare these functions in the #if section
> > (with the external keyword) to balance the above declarations?
>
> Why can't we do the linking in __clk_get() and __clk_put()?
>

Because we need the caller's 'struct device' to make the link and
this is not available in __clk_get(). I tried to ad it as parameter but
I don't think it is possible to retrieve a 'struct device' from the
device name. The functions where this is problematic are:
* clk.c:__of_clk_get_from_provider()
* clkdev.c:clk_get_sys()

By the way in my new version I called the helpers:
* clk_{link,unlink}_hierarchy()
* clk_{link,unlink}_consumer()

I will send a new version with these helpers, but if you have anything
in mind to help me achieve the above request, I will welcome the idea.


Thanks,
Miquèl

\
 
 \ /
  Last update: 2018-11-30 11:21    [W:0.097 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site