[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190625232820.D1D4A20645@mail.kernel.org>
Date:   Tue, 25 Jun 2019 16:28:20 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        James Hogan <jhogan@...nel.org>,
        Jason Cooper <jason@...edaemon.net>,
        Jonathan Corbet <corbet@....net>,
        Lee Jones <lee.jones@...aro.org>,
        Marc Zyngier <marc.zyngier@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Paul Burton <paul.burton@...s.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mathieu Malaterre <malat@...ian.org>, od@...c.me,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-clk@...r.kernel.org, Artur Rojek <contact@...ur-rojek.eu>
Subject: Re: [PATCH v13 05/13] clk: ingenic: Add driver for the TCU clocks
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.
Powered by blists - more mailing lists