All of lore.kernel.org
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: provide public clk_is_enabled function
Date: Sat, 5 Oct 2013 22:24:30 +0200	[thread overview]
Message-ID: <20131005202430.GI10079@pengutronix.de> (raw)
In-Reply-To: <1380881310-24345-1-git-send-email-sebastian.hesselbarth@gmail.com>

On Fri, Oct 04, 2013 at 12:08:30PM +0200, Sebastian Hesselbarth wrote:
> To determine if a clk has been previously enabled, provide a public
> clk_is_enabled function. This is especially helpful to check the state
> of clk-gate without actually changing the state of the gate.
I wonder what you want to do with the return value.

When doing

	if (clk_is_enabled(someclk))
		do_something();

you cannot in general know if the clock is still on when you start to
do_something.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Russell King <linux@arm.linux.org.uk>,
	Jason Cooper <jason@lakedaemon.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-kernel@vger.kernel.org,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Grant Likely <grant.likely@linaro.org>,
	Mike Turquette <mturquette@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: provide public clk_is_enabled function
Date: Sat, 5 Oct 2013 22:24:30 +0200	[thread overview]
Message-ID: <20131005202430.GI10079@pengutronix.de> (raw)
In-Reply-To: <1380881310-24345-1-git-send-email-sebastian.hesselbarth@gmail.com>

On Fri, Oct 04, 2013 at 12:08:30PM +0200, Sebastian Hesselbarth wrote:
> To determine if a clk has been previously enabled, provide a public
> clk_is_enabled function. This is especially helpful to check the state
> of clk-gate without actually changing the state of the gate.
I wonder what you want to do with the return value.

When doing

	if (clk_is_enabled(someclk))
		do_something();

you cannot in general know if the clock is still on when you start to
do_something.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  parent reply	other threads:[~2013-10-05 20:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 10:08 [PATCH] clk: provide public clk_is_enabled function Sebastian Hesselbarth
2013-10-04 10:08 ` Sebastian Hesselbarth
2013-10-04 13:17 ` Andrew Lunn
2013-10-04 13:17   ` Andrew Lunn
2013-10-05 20:24 ` Uwe Kleine-König [this message]
2013-10-05 20:24   ` Uwe Kleine-König
2013-10-05 20:42   ` Andrew Lunn
2013-10-05 20:42     ` Andrew Lunn
2013-10-06  9:06     ` Gerhard Sittig
2013-10-06  9:06       ` Gerhard Sittig
2013-10-06 16:30       ` Andrew Lunn
2013-10-06 16:30         ` Andrew Lunn
2013-10-06 19:42         ` Sebastian Hesselbarth
2013-10-06 19:42           ` Sebastian Hesselbarth
2013-10-06 20:02           ` Mike Turquette
2013-10-06 20:02             ` Mike Turquette
2013-10-06 22:24             ` Sebastian Hesselbarth
2013-10-06 22:24               ` Sebastian Hesselbarth
2013-10-06 21:04               ` Mike Turquette
2013-10-06 21:04                 ` Mike Turquette
2013-10-07  8:39                 ` Sebastian Hesselbarth
2013-10-07  8:39                   ` Sebastian Hesselbarth
2013-10-06 21:35               ` Andrew Lunn
2013-10-06 21:35                 ` Andrew Lunn

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=20131005202430.GI10079@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.