Linux-Clk Archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-clk@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Biju Das <biju.das.au@gmail.com>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 2/3] clk: Add clk_poll_disable_unprepare()
Date: Fri, 12 Apr 2024 16:41:06 +0100	[thread overview]
Message-ID: <ZhlWErZjizEc5bm5@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240318110842.41956-3-biju.das.jz@bp.renesas.com>

On Mon, Mar 18, 2024 at 11:08:41AM +0000, Biju Das wrote:
> The clk_disable_unprepare() doesn't guarantee that a clock is gated after
> the execution as it is driver dependent. The Renesas and most of the other
> platforms don't wait until clock is stopped because of performance reason.

I'm not sure it's "because of performance reason". It's probably more
that it's not important for functionality.

> But these platforms wait while turning on the clock.
> 
> The normal case for shutting down the clock is unbind/close/suspend or
> error paths in the driver. Not waiting for the shutting down the clock
> will improve the suspend time.
> 
> But on RZ/G2L Camera Data Receiving Unit (CRU) IP, initially the vclk is
> on. Before enabling link reception, we need to wait for vclk to be off
> and after enabling reception, we need to turn the vlck on. Special cases

"vclk" not "vlck".

> like this requires a sync API for clock gating.

I suppose this is fine for clocks that only have a single user, but
this is highly undefined for clocks that could be shared between
several different users, since it becomes racy whether another user
of the clock has enabled or disabled this clock.

I think this new API needs to spell it that it is not for clocks
that are shared.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

      parent reply	other threads:[~2024-04-12 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 11:08 [PATCH v3 0/3] Add clk_poll_disable_unprepare() Biju Das
2024-03-18 11:08 ` [PATCH v3 1/3] clk: Update API documentation related to clock disable Biju Das
2024-03-18 18:29   ` Sakari Ailus
2024-03-18 22:38   ` Laurent Pinchart
2024-04-11  8:04   ` Stephen Boyd
2024-04-12 15:36   ` Russell King (Oracle)
2024-03-18 11:08 ` [PATCH v3 2/3] clk: Add clk_poll_disable_unprepare() Biju Das
2024-03-18 18:23   ` Sakari Ailus
2024-03-18 22:55   ` Laurent Pinchart
2024-04-11  8:12     ` Stephen Boyd
2024-04-12 15:41   ` Russell King (Oracle) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhlWErZjizEc5bm5@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).