From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source
Date: Wed, 14 Oct 2009 11:09:15 +0100 [thread overview]
Message-ID: <20091014100915.GA24540@sirena.org.uk> (raw)
In-Reply-To: <4AD5514B.4090504@necel.com>
On Wed, Oct 14, 2009 at 01:19:23PM +0900, Shinya Kuribayashi wrote:
> * And clk_get() is expected to pick up a clock source with:
> 1) dev_id + clk_id ... strict matching condition (default)
> 2) dev_id only ... fuzzy extension1 (clk_id can be regarded as wildcard)
> 3) clk_id only ... fuzzy extension2 (dev_id can be regarded as wildcard)
> 2) and 3) might be sort of ARM's clkdev extensions
> (I think it's useful), but that's not my point.
> I'll leave that alone for now.
Part of the reason I was querying this is that you were using the clock
name "dw_i2c_clk" which looks like a globally namespaced name which
would be used with option 3 above. Several clock frameworks just
completely ignore dev_id which creates a lot of problems down the line.
If it had just been i2c_clk I'd have been less likely to follow up.
Option 3 has never been the intended use of the clock API and is
basically a bug in any clock implementation that requires it for most
drivers but it does need to be used in a few limited cases where the
relevant kernel subsystem doesn't provide a struct device (cpufreq is
the major offender here).
> * From the point of drivers, we're never interested in clk_get()
> implementation, and which matching pattern 1) - 3) is taken.
> Supplying only "dev_id" could be regarded as misuse of clk_get(),
As far as I can tell from what rmk is saying it seems that the use of a
NULL string is actually an intended usage for devices where the clocks
aren't otherwise named. I had the concerns when I first saw this usage
but it does seem to be an expected and intended use.
> and will increase dependence on clk framework implementation.
To a certain extent this is good in that it applies pressure to improve
the clock API implementations concerned.
next prev parent reply other threads:[~2009-10-14 10:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 2:44 [RFC] i2c-designware patches Shinya Kuribayashi
2009-10-13 2:48 ` [PATCH 01/16] i2c-designware: Consolidate to use 32-bit word accesses Shinya Kuribayashi
2009-10-13 2:48 ` [PATCH 02/16] i2c-designware: Don't use the IC_CLR_INTR register to clear interrupts Shinya Kuribayashi
2009-10-13 2:49 ` [PATCH 03/16] i2c-designware: Use platform_get_irq helper Shinya Kuribayashi
2009-10-13 2:49 ` [PATCH 04/16] i2c-designware: i2c_dw_read: Take "struct dw_i2c_dev" pointer Shinya Kuribayashi
2009-10-13 2:50 ` [PATCH 05/16] i2c-designware: i2c_dw_xfer_msg: " Shinya Kuribayashi
2009-10-13 2:50 ` [PATCH 06/16] i2c-designware: Remove an useless local variable "num" Shinya Kuribayashi
2009-10-13 2:50 ` [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source Shinya Kuribayashi
2009-10-13 9:54 ` Mark Brown
2009-10-14 4:19 ` Shinya Kuribayashi
2009-10-13 22:41 ` Ben Dooks
2009-10-14 4:19 ` Shinya Kuribayashi
2009-10-14 10:09 ` Mark Brown [this message]
2009-10-14 19:14 ` Russell King - ARM Linux
2009-10-15 3:37 ` Shinya Kuribayashi
2009-10-13 2:51 ` [PATCH 08/16] i2c-designware: Improve _HCNT/_LCNT calculation Shinya Kuribayashi
2009-10-13 2:51 ` [PATCH 09/16] i2c-designware: i2c_dw_xfer_msg: Fix an i2c_msg search bug Shinya Kuribayashi
2009-10-13 2:52 ` [PATCH 10/16] i2c-designware: Do dw_i2c_pump_msg's jobs in the interrutp handler Shinya Kuribayashi
2009-10-13 2:52 ` [PATCH 11/16] i2c-designware: Set Tx/Rx FIFO threshold levels Shinya Kuribayashi
2009-10-13 2:52 ` [PATCH 12/16] i2c-designware: Divide i2c_dw_xfer_msg into two functions Shinya Kuribayashi
2009-10-13 2:53 ` [PATCH 13/16] i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer Shinya Kuribayashi
2009-10-13 2:53 ` [PATCH 14/16] i2c-designware: Deferred FIFO-data-counting variables initialization Shinya Kuribayashi
2009-10-13 2:53 ` [PATCH 15/16] i2c-designware: i2c_dw_xfer_msg: Mark as completed on an error Shinya Kuribayashi
2009-10-15 5:29 ` Shinya Kuribayashi
2009-10-13 2:54 ` [PATCH 16/16] i2c-designware: Add I2C_FUNC_SMBUS_* bits Shinya Kuribayashi
2009-10-14 18:53 ` Baruch Siach
2009-10-15 3:22 ` Shinya Kuribayashi
2009-10-13 7:04 ` [RFC] i2c-designware patches Baruch Siach
2009-10-13 8:01 ` Shinya Kuribayashi
2009-10-14 19:02 ` Baruch Siach
2009-10-19 1:23 ` Shinya Kuribayashi
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=20091014100915.GA24540@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).