public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Samuel Ortiz <sameo@openedhand.com>,
	Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: OMAP: Fix missing includes
Date: Sat, 10 Jan 2009 13:21:25 -0800	[thread overview]
Message-ID: <200901101321.26068.david-b@pacbell.net> (raw)
In-Reply-To: <20090110162048.GA1327@n2100.arm.linux.org.uk>

On Saturday 10 January 2009, Russell King - ARM Linux wrote:
> In other words:
> 
>         if (cpu_is_omap2430())
>                 osc = clk_get(NULL, "osc_ck");
>         else
>                 osc = clk_get(NULL, "osc_sys_ck");
> 
> becomes:
> 
>         osc = clk_get(dev, "hfclk");
> 
> since "hfclk" is the name of the input on the device, or it should be
> NULL if it is the only input on the device (iow, you don't want to
> distinguish it from the 32kHz clock.)

Sort of.  The twl4030 has "hfclkin" ... from which it
generates "hfclkout", and that likely becomes "osc_sys_ck"
(or "osc_ck" on omap2430).  Agreed that the OMAP main
clock is actually a proxy for what's needed.


> And that eliminates the need for any platform specific includes (which
> is the whole point of the clk API - giving drivers a _generic_ way to
> get at clock information without resorting to platform specific crap.)

Yeah but ... remembering that the twl4030 is an I2C
device, which is initialized well after the clock
framework and associated SoC platform devices, that
implementation approach begs a few questions:

 - How to associate clocks with non-SoC devices.

   This is an issue that comes up repeatedly when folk
   want to apply <linux/clk.h> calls to things like
   off-chip codecs ... sometimes fed by programmable
   off-chip clock generators, for which one would
   naturally want portable drivers.

 - How to perform *this* association "late", as part
   of setting up the I2C device when its i2c_adapter
   is set up ... and before i2c_driver.probe() for
   the device is called.  This obviously generalizes...

 - Likewise, how to reverse that association when
   that device is removed (e.g. because the adapter
   driver gets removed or unbound).  Also generalizes.

Full answers for those questions imply some degree of
implementation framework for <linux/clk.h> ... a change
from its current status as a pure interface.

Probably "Answers Mark I" would depend on extensions
to the platform specific <linux/clk.h> implementation 
frameworks.

- Dave

  parent reply	other threads:[~2009-01-10 21:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 11:14 [PATCH 0/2] Fix omap builds Tony Lindgren
2009-01-07 11:16 ` [PATCH 1/2] ARM: OMAP: Fix missing includes Tony Lindgren
2009-01-07 11:17   ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls Tony Lindgren
2009-01-07 11:37     ` Jarkko Nikula
2009-01-07 12:03       ` Tony Lindgren
2009-01-07 13:26         ` Adrian Hunter
2009-01-07 13:18           ` Tony Lindgren
2009-01-07 16:18     ` Russell King - ARM Linux
2009-01-07 17:50       ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls, v2 Tony Lindgren
2009-01-07 22:00         ` Russell King - ARM Linux
2009-01-08  7:36           ` updated git pull request for omap compile fixes, mailbox and hsmmc Tony Lindgren
2009-01-10 11:05             ` Russell King - ARM Linux
2009-01-11 10:14               ` Russell King - ARM Linux
2009-01-12  6:24                 ` Tony Lindgren
2009-01-12 16:43                   ` Russell King - ARM Linux
2009-01-13 10:30                     ` Tony Lindgren
2009-01-19 16:36                       ` Russell King - ARM Linux
2009-01-23  0:45                         ` Tony Lindgren
2009-01-12  6:28               ` Tony Lindgren
2009-01-10 11:02     ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls Russell King - ARM Linux
2009-01-12 13:14       ` Tony Lindgren
2009-01-10 10:57   ` [PATCH 1/2] ARM: OMAP: Fix missing includes Russell King - ARM Linux
2009-01-10 15:56   ` Samuel Ortiz
2009-01-10 16:20     ` Russell King - ARM Linux
2009-01-10 17:40       ` Samuel Ortiz
2009-01-10 17:56         ` Russell King - ARM Linux
2009-01-12  6:45           ` Tony Lindgren
2009-01-10 21:21       ` David Brownell [this message]
2009-01-10 20:49     ` David Brownell
2009-01-11  0:01       ` Samuel Ortiz
2009-01-12  6:31         ` Tony Lindgren
2009-01-07 11:25 ` git pull request for omap compile fixes, mailbox and hsmmc for current merge window Tony Lindgren

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=200901101321.26068.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sameo@openedhand.com \
    --cc=tony@atomide.com \
    /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