public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>,
	linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: AVR32 architecture patch against Linux 2.6.18-rc1 available
Date: Thu, 6 Jul 2006 10:51:50 +0100	[thread overview]
Message-ID: <20060706095150.GA1399@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060706021906.1af7ffa3.akpm@osdl.org>

On Thu, Jul 06, 2006 at 02:19:06AM -0700, Andrew Morton wrote:
> - What are these for?
> 
> 	+EXPORT_SYMBOL(clk_get);
> 	+EXPORT_SYMBOL(clk_put);
> 	+EXPORT_SYMBOL(clk_enable);
> 	+EXPORT_SYMBOL(clk_disable);
> 	+EXPORT_SYMBOL(clk_get_rate);
> 	+EXPORT_SYMBOL(clk_round_rate);
> 	+EXPORT_SYMBOL(clk_set_rate);
> 	+EXPORT_SYMBOL(clk_set_parent);
> 	+EXPORT_SYMBOL(clk_get_parent);

Part of the clock framework.  No, not the one that you've probably
heard about (which is in connection with time, and IMHO incorrectly
named).

This one is to do with controlling the clock sources for peripherals
in systems, to allow drivers to be shared between platforms with the
minimum of crap in drivers.

For example, the ARM Ltd AMBA "devices" end up being embedded into ARM
SoCs, MIPS SoCs and now probably AVR32 SoCs.  These drivers need a way
to be told, eg, their clock source rate in the case of a UART, and be
able to control the clock rate in the case of an LCD controller.  It's
also advantageous for power saving to be able to turn clock sources
on and off.

You can have hardware situations where the clock source for UARTs
depend on where they are on the bus, possibly clocked at different
rates, or all UARTs are clocked from one source.

How that is achieved is extremely SoC or platform specific, and as such
I put together a well defined API (include/linux/clk.h) which gives:

1. an API for drivers to follow to achieve achieve inter-operability and
   re-use with the minimum of fuss.
2. complete flexibility to the platform code to implement the backend
   how they see fit, using whatever structures they see fit.

It's great that the AVR32 folk are reusing this.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-07-06  9:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06  8:52 AVR32 architecture patch against Linux 2.6.18-rc1 available Haavard Skinnemoen
2006-07-06  9:19 ` Andrew Morton
2006-07-06  9:51   ` Russell King [this message]
2006-07-06  9:58   ` Arjan van de Ven
2006-07-06 10:43     ` Haavard Skinnemoen
2006-07-06 15:17       ` Russell King
2006-07-06 10:03   ` Haavard Skinnemoen
2006-07-06 10:14     ` Andrew Morton
2006-07-06 13:57       ` Haavard Skinnemoen
2006-07-10  9:03       ` Haavard Skinnemoen
2006-07-10  9:31         ` Andrew Morton
2006-07-10  9:37         ` Andrew Morton
2006-07-10 11:04           ` Haavard Skinnemoen
2006-07-10  9:57         ` David Woodhouse
2006-07-10 11:25           ` Haavard Skinnemoen
2006-07-06 11:30     ` Thomas Gleixner
2006-07-06 11:50       ` Haavard Skinnemoen
2006-07-06 12:10         ` Thomas Gleixner
2006-07-06 11:58 ` David Woodhouse
2006-07-06 14:13   ` Haavard Skinnemoen
2006-07-06 14:34     ` David Woodhouse
2006-07-06 18:48       ` Haavard Skinnemoen
2006-07-06 23:17         ` David Woodhouse
2006-07-07 10:39   ` Haavard Skinnemoen
2006-07-07 10:44     ` Arjan van de Ven
2006-07-07  8:08 ` Nick Piggin
2006-07-07  8:18   ` Nick Piggin
2006-07-07 16:36   ` Haavard Skinnemoen

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=20060706095150.GA1399@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=hskinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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