lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v13 05/13] clk: ingenic: Add driver for the TCU clocks
Date
Quoting Paul Cercueil (2019-06-25 15:37:07)
> >
> > Do you need to get the clk by name? Or can that clk be "known" to the
> > TCU somehow so we can already have a direct clk pointer?
>
> This clock is provided by a separate driver, so I have to obtain the
> clock pointer from devicetree.

Ok.

> >> +}
> >> +
> >> +static int __maybe_unused tcu_pm_suspend(void)
> >> +{
> >> + struct ingenic_tcu *tcu = ingenic_tcu;
> >> +
> >> + if (tcu->clk)
> >> + clk_disable(tcu->clk);
> >
> > Do you need to unprepare? Or it just isn't possible because this is
> > called from syscore and thus we can't sleep?
>
> I thought that clk_disable() was enough. We don't actually need to
> unprepare, do we? And yes, as you pointed out, this call cannot sleep.

Yeah unprepare isn't necessary, but it will be different on different
platforms. This is a highly platform specific driver though so I suspect
this is all fine.

\
 
 \ /
  Last update: 2019-06-26 01:29    [W:0.208 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site