public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: voice.shen@atmel•com (Bo Shen)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] i2c: change the id to let the i2c device work
Date: Fri, 12 Oct 2012 13:45:48 +0800	[thread overview]
Message-ID: <5077AE8C.5040605@atmel.com> (raw)
In-Reply-To: <20121012051419.GJ11726@opensource.wolfsonmicro.com>

On 10/12/2012 13:14, Mark Brown wrote:
> On Fri, Oct 12, 2012 at 12:57:34PM +0800, Bo Shen wrote:
>> On 10/12/2012 12:40, Mark Brown wrote:
>>> On Fri, Oct 12, 2012 at 10:34:18AM +0800, Bo Shen wrote:
>
>>>> As the old method will use platform device id, change the id to
>>>> let the i2c device work
>
>>> What are "the old method" and new method?  You're not explaining why
>>> this is needed...
>
>> Maybe use the 'legacy method' will be better (I am not sure). Now,
>> the Linux kernel is transferring to device tree which doesn't use
>> platform device id. So, change the id to let the legacy code work.
>
>> May you understand.
>
> No, this still makes no sense to me.  This is clearly a non-DT device
> registration, what does DT have to do with anything here?  What is the

Yes, this is non-DT device registration.
As the Linux kernel code is transferring to DT which doesn't use 
platform device id. however here, modified unconsciously. So correct 
this error.

> practical problem you are seeing in your system and how does this help
> with it?

In non-DT kernel, we use platform device id to distinguish between each 
device.

For example,
if register i2c device on i2c bus 0, using:
   i2c_register_board_info(0, ...)
if register i2c device on i2c bus 1, using:
   i2c_register_board_info(1, ...)

So, in this case, if the id = -1, i2c core will dynamically assign a bus 
id to this bus when running, the dynamically assigned bus id is unknown 
when writing the code. So, when we use i2c_register_board_info(int 
busnum, ...) to register device on busnum. we don't know which value to 
be use.

So, this patch will fix this issue.


BRs,
Bo Shen

  reply	other threads:[~2012-10-12  5:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12  2:34 [PATCH] i2c: change the id to let the i2c device work Bo Shen
2012-10-12  4:40 ` Mark Brown
2012-10-12  4:57   ` Bo Shen
2012-10-12  5:14     ` Mark Brown
2012-10-12  5:45       ` Bo Shen [this message]
2012-10-12  5:53         ` Mark Brown
2012-10-12  6:42           ` Bo Shen
2012-10-12  7:14           ` Jean Delvare
2012-10-12  7:55             ` Bo Shen
2012-10-12  8:05               ` Jean Delvare
2012-10-12  8:21                 ` Mark Brown
2012-10-12  9:02                   ` Bo Shen

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=5077AE8C.5040605@atmel.com \
    --to=voice.shen@atmel$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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