lkml.org 
[lkml]   [2015]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/5] clocksource: sun5i: Add clock notifiers
On Mon, Jan 26, 2015 at 03:35:41PM +0100, Maxime Ripard wrote:
> > >+static int sun5i_rate_cb_clksrc(struct notifier_block *nb,
> > >+ unsigned long event, void *data)
> > >+{
> > >+ struct clk_notifier_data *ndata = data;
> > >+ struct sun5i_timer *timer = to_sun5i_timer(nb);
> > >+ struct sun5i_timer_clksrc *cs = container_of(timer,
> > >+ struct sun5i_timer_clksrc, timer);
> > >+
> > >+ switch (event) {
> > >+ case PRE_RATE_CHANGE:
> > >+ clocksource_unregister(&cs->clksrc);
> > >+ break;
> > >+
> > >+ case POST_RATE_CHANGE:
> > >+ clocksource_register_hz(&cs->clksrc, ndata->new_rate);
> > >+ break;
> >
> > Why clocksource_unregister couldn't be in the POST_RATE_CHANGE ?
>
> Wouldn't that leave a (small, I agree) window where the timer would
> run at a rate different to the one it has been registered with?

Ping?

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-03-03 10:21    [W:0.099 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site