From: Magnus Damm <magnus.damm@gmail.com>
To: Simon Horman <horms@verge.net.au>
Cc: linux-i2c@vger.kernel.org, linux-sh@vger.kernel.org,
lethal@linux-sh.org, ben-linux@fluff.org, khali@linux-fr.org
Subject: Re: [PATCH] i2c: i2c-sh_mobile bus speed platform data
Date: Thu, 28 Apr 2011 01:06:38 +0000 [thread overview]
Message-ID: <BANLkTi=YbtWYKLdcEkv6TDRfm-BbXGXa4w@mail.gmail.com> (raw)
In-Reply-To: <20110427221357.GA12273@verge.net.au>
On Thu, Apr 28, 2011 at 7:14 AM, Simon Horman <horms@verge.net.au> wrote:
> Hi Magnus,
>
> On Thu, Apr 21, 2011 at 10:22:54PM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Add support to the i2c-sh_mobile driver for setting
>> the I2C bus speed using platform data.
>>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>> ---
>>
>> drivers/i2c/busses/i2c-sh_mobile.c | 13 +++++++++++--
>> include/linux/i2c-sh_mobile.h | 10 ++++++++++
>> 2 files changed, 21 insertions(+), 2 deletions(-)
>>
>> --- 0013/drivers/i2c/busses/i2c-sh_mobile.c
>> +++ work/drivers/i2c/busses/i2c-sh_mobile.c 2011-04-21 20:20:23.000000000 +0900
>> @@ -32,6 +32,7 @@
>> #include <linux/clk.h>
>> #include <linux/io.h>
>> #include <linux/slab.h>
>> +#include <linux/i2c-sh_mobile.h>
>>
>> /* Transmit operation: */
>> /* */
>> @@ -117,7 +118,7 @@ struct sh_mobile_i2c_data {
>> struct device *dev;
>> void __iomem *reg;
>> struct i2c_adapter adap;
>> -
>> + unsigned long bus_speed;
>> struct clk *clk;
>> u_int8_t icic;
>> u_int8_t iccl;
>> @@ -205,7 +206,7 @@ static void activate_ch(struct sh_mobile
>> * We also round off the result.
>> */
>> num = i2c_clk * 5;
>> - denom = NORMAL_SPEED * 9;
>> + denom = pd->bus_speed * 9;
>
> I believe that on the sh73a0 and so far only the sh73a0
> denom needs to be doubled.
Uhm, I don't think this patch is specific to any SoC type. It may of
course be used on sh73a0 to adjust the denom value, but setting the
I2C bus speed is something that can be used on any SoC. So I'd say
that this is a fairly generic feature.
Thanks,
/ magnus
next prev parent reply other threads:[~2011-04-28 1:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 13:22 [PATCH] i2c: i2c-sh_mobile bus speed platform data Magnus Damm
2011-04-27 22:14 ` Simon Horman
2011-04-28 1:06 ` Magnus Damm [this message]
[not found] ` <BANLkTi=YbtWYKLdcEkv6TDRfm-BbXGXa4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-28 1:18 ` Simon Horman
2011-04-28 2:22 ` Paul Mundt
[not found] ` <20110428022214.GB13539-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2011-04-28 2:46 ` Magnus Damm
2011-04-28 3:11 ` Paul Mundt
[not found] ` <20110428031115.GD13539-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2011-04-28 3:25 ` Magnus Damm
2011-04-28 4:43 ` Simon Horman
2011-04-28 4:25 ` [PATCH] i2c: i2c-sh_mobile bus speed platform data V2 Magnus Damm
2011-04-28 23:03 ` Simon Horman
2011-05-04 0:59 ` [PATCH] i2c: i2c-sh_mobile bus speed platform data dong chen
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='BANLkTi=YbtWYKLdcEkv6TDRfm-BbXGXa4w@mail.gmail.com' \
--to=magnus.damm@gmail.com \
--cc=ben-linux@fluff.org \
--cc=horms@verge.net.au \
--cc=khali@linux-fr.org \
--cc=lethal@linux-sh.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-sh@vger.kernel.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).