linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Feng Tang <feng.tang@intel.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jean Delvare (PC drivers, core)" <khali@linux-fr.org>,
	"Ben Dooks (embedded platforms)" <ben-linux@fluff.org>,
	Tomoya MORINAGA <tomoya.rohm@gmail.com>
Subject: Re: i2c-eg20t: regression since i2c_add_numbered_adapter change
Date: Wed, 22 Aug 2012 09:57:07 +0200	[thread overview]
Message-ID: <3514180.RWySLZuOJm@ws-stein> (raw)
In-Reply-To: <20120822152918.3e59616e@feng-i7>

Hello,

On Wednesday 22 August 2012 15:29:18, Feng Tang wrote:
> On Wed, 22 Aug 2012 08:30:35 +0200
> Alexander Stein <alexander.stein@systec-electronic.com> wrote:
> 
> > Hello,
> > 
> > I just noticed the 3.4 linux kernel fails to sucessfully probe the i2c-eg20t 
> > driver. I returns with EBUSY error. It worked on the 3.0 kernel. To my view it 
> > is caused the commit 07e8a51ff68353e01d795cceafbac9f54c49132b ( i2c-eg20t: use 
> > i2c_add_numbered_adapter to get a fixed bus number).
> > The reason it actually fails is that the i2c-isch driver is registered 
> > beforehand which gets bus number 0. But this one is the bus number the eg20t 
> > driver wants to register.
> 
> Make sense.
> 
> > A possibility is that if i2c_add_numbered_adapter failed with EBUSY just use 
> > i2c_add_adapter to get at least the driver working, but with a non-fixed bus 
> > number. Opinions?
> 
> Or can we give it a fixed offset, like let the i2c_eg20t controller bus number
> start with 4? I don't expect there will be more than 4 other i2c controllers 
> on EG20T compatible platforms.

Why use a fixed one? Give the driver (and maybe every i2c bus driver) a parameter which sets the base bus number it should use.
E.g. i2c-eg20t.base-bus-num=2 so it will register the bus numbers starting from 2. If this parameter is unset. It would use the first free one, thus simply using i2c_add_adapter.

Regards,
Alexander

  reply	other threads:[~2012-08-22  7:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22  6:30 i2c-eg20t: regression since i2c_add_numbered_adapter change Alexander Stein
2012-08-22  7:29 ` Feng Tang
2012-08-22  7:57   ` Alexander Stein [this message]
2012-08-22  8:04     ` Feng Tang
2012-08-22  9:17       ` Alexander Stein
2012-08-23  8:28         ` Feng Tang
2012-08-29 18:40           ` Jean Delvare
     [not found]             ` <20120829204031.648a73e1-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-08-30  7:49               ` Alexander Stein
2012-08-30  9:19                 ` Feng Tang
2012-08-30 11:08                   ` Alexander Stein
2012-08-31  2:16                     ` Feng Tang
2012-09-08 13:18                 ` Jean Delvare
2012-08-30  9:10               ` Feng Tang

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=3514180.RWySLZuOJm@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=ben-linux@fluff.org \
    --cc=feng.tang@intel.com \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomoya.rohm@gmail.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).