linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben@fluff.org>
To: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Cc: baruch@tkos.co.il, linux-i2c@vger.kernel.org,
	ben-linux@fluff.org, linux-mips@linux-mips.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source
Date: Tue, 13 Oct 2009 23:41:23 +0100	[thread overview]
Message-ID: <20091013224123.GB13398@fluff.org.uk> (raw)
In-Reply-To: <4AD3EB09.8050304@necel.com>

On Tue, Oct 13, 2009 at 11:50:49AM +0900, Shinya Kuribayashi wrote:
> This driver is originally prepared for the ARM kernel where rich and
> well-maintained "clkdev" clock framework is available, and clock name
> might not be strictly required.  ARM's clkdev does slightly fuzzy
> matching where it basically gives preference to "struct device" mathing
> over "clock id".  As long as used for ARM machines, there's no problem.
> 
> However, all users of this driver necessarily don't have the same clk
> framework with ARM's, as the clk I/F implementation varies depending on
> ARCHs and machines.
> 
> This patch adds a clock name so that other users with simple/minimum/
> limited clk support could make use of the driver.

You're meant to match with both the device and name, I belive the
clkdev specification has always said this. I'm of the opinion if
the clkdev implementation isn't getting this right, then it is the
clkdev that should be fixed, not this driver.
 
> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
> ---
> drivers/i2c/busses/i2c-designware.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
> index 9d81775..0f8bd4c 100644
> --- a/drivers/i2c/busses/i2c-designware.c
> +++ b/drivers/i2c/busses/i2c-designware.c
> @@ -575,7 +575,7 @@ static int __devinit dw_i2c_probe(struct platform_device *pdev)
> 	dev->irq = irq;
> 	platform_set_drvdata(pdev, dev);
> 
> -	dev->clk = clk_get(&pdev->dev, NULL);
> +	dev->clk = clk_get(&pdev->dev, "dw_i2c_clk");
> 	if (IS_ERR(dev->clk)) {
> 		r = -ENODEV;
> 		goto err_free_mem;

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2009-10-13 23:11 UTC|newest]

Thread overview: 25+ 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 22:41   ` Ben Dooks [this message]
2009-10-14  4:19     ` Shinya Kuribayashi
2009-10-14 19:14       ` Russell King - ARM Linux
2009-10-15  3:37         ` Shinya Kuribayashi
     [not found]   ` <20091013095417.GB1230@sirena.org.uk>
2009-10-14  4:19     ` 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
     [not found]   ` <20091014185327.GD11789@tarshish>
2009-10-15  3:22     ` Shinya Kuribayashi
     [not found] ` <20091013070412.GA9739@jasper.tkos.co.il>
2009-10-13  8:01   ` [RFC] i2c-designware patches 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=20091013224123.GB13398@fluff.org.uk \
    --to=ben@fluff.org \
    --cc=baruch@tkos.co.il \
    --cc=ben-linux@fluff.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=shinya.kuribayashi@necel.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;
as well as URLs for NNTP newsgroup(s).