Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752698Ab3JEUYw (ORCPT ); Sat, 5 Oct 2013 16:24:52 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:47604 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487Ab3JEUYv (ORCPT ); Sat, 5 Oct 2013 16:24:51 -0400 Date: Sat, 5 Oct 2013 22:24:30 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Sebastian Hesselbarth Cc: Andrew Lunn , Russell King , Jason Cooper , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Jason Gunthorpe , Ezequiel Garcia , Grant Likely , Mike Turquette , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] clk: provide public clk_is_enabled function Message-ID: <20131005202430.GI10079@pengutronix.de> References: <1380881310-24345-1-git-send-email-sebastian.hesselbarth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1380881310-24345-1-git-send-email-sebastian.hesselbarth@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 893 Lines: 25 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/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/