public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	konkers-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org,
	mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 5/7] ARM: tegra: timer: Enable timer and rtc clocks
Date: Tue, 22 Feb 2011 20:56:34 +0000	[thread overview]
Message-ID: <20110222205634.GF29559@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1298342392-21236-6-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>

On Mon, Feb 21, 2011 at 06:39:50PM -0800, Colin Cross wrote:
> +	struct clk *clk;
>  	unsigned long rate = clk_measure_input_freq();
>  	int ret;
>  
> +	clk = clk_get_sys("timer", NULL);
> +	BUG_ON(IS_ERR(clk));
> +	clk_enable(clk);
> +	clk_put(clk);
> +
> +	clk = clk_get_sys("rtc-tegra", NULL);
> +	BUG_ON(IS_ERR(clk));
> +	clk_enable(clk);
> +	clk_put(clk);

It's probably better to leave them get'd if you're continuing to use
them and just forget the reference.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-02-22 20:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  2:39 [PATCH 0/7] Second batch of Tegra clock updates for 2.6.39 Colin Cross
2011-02-22  2:39 ` [PATCH 1/7] ARM: tegra: clock: Refcount periph clock enables Colin Cross
     [not found]   ` <1298342392-21236-2-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22  5:25     ` Olof Johansson
2011-02-22  2:39 ` [PATCH 2/7] ARM: tegra: clock: Round rate before setting rate Colin Cross
     [not found]   ` <1298342392-21236-3-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22  5:26     ` Olof Johansson
2011-02-22  2:39 ` [PATCH 3/7] ARM: tegra: clock: Check for clk_num == 0 Colin Cross
2011-02-22  5:29   ` Olof Johansson
2011-02-22  2:39 ` [PATCH 4/7] ARM: tegra: Move tegra_common_init to tegra_init_early Colin Cross
2011-02-22  5:30   ` Olof Johansson
2011-02-22  2:39 ` [PATCH 5/7] ARM: tegra: timer: Enable timer and rtc clocks Colin Cross
     [not found]   ` <1298342392-21236-6-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22  5:32     ` Olof Johansson
     [not found]       ` <AANLkTim=TZaqZFSJwOAN2gntvu=fiHVPQVn12=WyF9Wi-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22  8:00         ` Colin Cross
     [not found]           ` <AANLkTi=pJw7oTUY2jmaSB=chds0fXFaA3+jrT=y8Jpzv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 15:28             ` Olof Johansson
2011-02-22 20:56     ` Russell King - ARM Linux [this message]
     [not found]       ` <20110222205634.GF29559-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-02-23 17:39         ` Colin Cross
2011-02-22  2:39 ` [PATCH 6/7] ARM: tegra: common: Enable core clocks Colin Cross
     [not found]   ` <1298342392-21236-7-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22  5:32     ` Olof Johansson
2011-02-22  2:39 ` [PATCH 7/7] ARM: tegra: clock: Disable clocks left on by bootloader Colin Cross
     [not found]   ` <1298342392-21236-8-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22  5:43     ` Olof Johansson
     [not found]       ` <AANLkTikNSEyjdL0Lchmm-bFxD00omkGLq6Q6Yyjy51Ov-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22  8:05         ` Colin Cross
     [not found]           ` <AANLkTi==wykFCCjamRNh2ngEaubgeLqmZ7Mv9OsH=0cL-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 15:30             ` Olof Johansson
2011-02-22 19:38 ` [PATCH 0/7] Second batch of Tegra clock updates for 2.6.39 Colin Cross

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=20110222205634.GF29559@n2100.arm.linux.org.uk \
    --to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=konkers-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.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