From: dong chen <china.gd.sz.cd@gmail.com>
To: Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
Cc: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org"
<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
"khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] i2c: i2c-sh_mobile bus speed platform data
Date: Wed, 04 May 2011 00:59:38 +0000 [thread overview]
Message-ID: <-7669036502097985728@unknownmsgid> (raw)
In-Reply-To: <20110421132254.3725.84300.sendpatchset@t400s>
Magnus Damm <magnus.damm@gmail.com>编写:
On Thu, Apr 28, 2011 at 12:11 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Thu, Apr 28, 2011 at 11:46:37AM +0900, Magnus Damm wrote:
>> On Thu, Apr 28, 2011 at 11:22 AM, Paul Mundt <lethal@linux-sh.org> wrote:
>> > On Thu, Apr 28, 2011 at 10:18:01AM +0900, Simon Horman wrote:
>> >> On Thu, Apr 28, 2011 at 10:06:38AM +0900, Magnus Damm wrote:
>> >> > On Thu, Apr 28, 2011 at 7:14 AM, Simon Horman <horms@verge.net.au> wrote:
>> >> > > 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.
>> >>
>> >> I'm just saying that that I've observed the value being doubled for sh73a0.
>> >>
>> > The general rule of thumb is that whatever unusual behaviour is observed
>> > in the latest CPU we will see become the standard for future ones.
>>
>> This may also be an attempt to simply double the I2C bus speed on that
>> particular platform for that particular application. So in the end it
>> may have nothing to do with sh73a0. Actually, now when I think about
>> it, I recall hacking up a prototype to control the LCD backlight via
>> I2C on sh73a0 and AG5EVM, and I did not have to modify any part of the
>> I2C bus driver to get that going as expected.
>>
> Ok, that bit of information was missing from your patch. That's obviously
> a bit more dodgy. We don't want to have the default behaviour out of spec
> for some specific application.
I suspect that I may have chosen my words poorly. By writing "This may
also be an attempt to simply double the I2C bus speed on that
particular platform for that particular application." I am not
referring to this patch. I am commenting on something Simon may see
when he is going though kernel source that has been mangled by people
doing integration.
As for configuring the i2c bus speed, I wouldn't call it dodgy. It is
something that is fairly common but of course needs to be handled with
care. Other drivers handle this through module parameters, but since
we want to configure this with per-device instance granularity
platform data is a better fit.
>> > Abstracting the denom value seems reasonable as a cautionary measure, and
>> > it does do the NORMAL_SPEED as a default fallback so there is no adverse
>> > impact for normalized platforms.
>> >
>> > This really should be going in to include/linux/i2c/ or so though, no
>> > need to dump these tiny stubs in to include/linux/ directly.
>>
>> I guess I just followed what other i2c drivers do, but yes, putting
>> the header file in include/linux/i2c/ makes more sense.
>>
> Other i2c drivers put things in include/linux/i2c, too. There's also an
> include/linux/platform_data/ now as well for things that don't fit
> anywhere else. "This is the way we used to do it" tends to be a pretty
> pointless argument going forward.
I looks like I have been unclear in my writing once again. I'm not
arguing that the header should be kept in include/linux/.
/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-05-04 0:59 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
[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 ` dong chen [this message]
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=-7669036502097985728@unknownmsgid \
--to=china.gd.sz.cd@gmail.com \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).