Hi Chris,

On Wed, Jan 25, 2017 at 3:35 PM, Chris Brandt <chris.bra...@renesas.com> wrote:
> On Wednesday, January 25, 2017, Geert Uytterhoeven wrote:
>> > But won't the individual drivers still want to keep turning clocks on
>> and off manually?
>> > (unless I'm not understanding that the underlying clock routines will
>> basically just
>> > ignore everything). But even if that' the case...that just wasted CPU
>> cycles (remember,
>> > I'm only working with a 400MHz single core here running XIP_KERNEL)
>>
>> If a clock is already enabled, preparing and/or enabling it again will
>> just
>> increase the prepare resp. enable counters. Disabling/unpreparing
>> afterwards
>> will also just decrease the counters. Should be quite cheap
>
> OK, I think I see your point:
>
> If I go and double-enable a clock, then the runtime pm won't do much
> of anything because I'll always be a count higher so a true 'clock disable'
> will never really occur. Is that correct?

That's correct.

> #I'm getting side tracked from what I really started to do which was test
> out PFC for i2c and spi :(

Welcome to the world of scratching your (increasing number of) itches ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Reply via email to