linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [sodaville] [PATCH] i2c/i2c-dev: use dynamic minor allocation
Date: Fri, 26 Nov 2010 22:14:09 +0100	[thread overview]
Message-ID: <20101126211409.GA743@www.tglx.de> (raw)
In-Reply-To: <20101126204632.6ff96d57-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>

* Jean Delvare | 2010-11-26 20:46:32 [+0100]:

>Hi Sebastian,
Hi Jean,

>Huh? Is pdev a platform device? So you are instantiating platform
>devices off a PCI device, and in turn each platform device gets to
>create an i2c_adapter device?
Yup, exactly.

>Now I understand why you needed to craft a unique id. I don't quite get
>why you came up with such a complicated setup in the first place
>though. What's wrong with just making the i2c_adapter devices direct
>children of the PCI device? Is this a limitation of
>of_i2c_register_devices() that it needs platform devices to operate on?
No. In the end we have one driver which may get probed viaa  PCI device
or a platform device. This leaves me two choices: 
- create a platform device out of the PCI device like I did
- add PCI probing code to the platform driver so it provides two
  interfaces

If you are look at the i2c_pxa_probe() function then you'll notice
that there is no real cut between obtaining ressource informations and
setting up the i2c device. So this would require to split this function
into pieces and share the code between those two interfaces. While
looking at it, I decided against the split.
This way the patch way smaller and simpler. I don't see a disadvantage
with the platform device here. Well maybe the pdev->id problem :)

>Meanwhile I've updated i2c-tools to support dev minors beyond 255. You
>should no longer need this, but at least it's ready if we ever need it.
>Who knows, maybe we'll see a system with more than 255 I2C bus segments
>someday.

Yeah, I don't right now.

Sebastian

  parent reply	other threads:[~2010-11-26 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 21:23 [PATCH] i2c/i2c-dev: use dynamic minor allocation Sebastian Andrzej Siewior
     [not found] ` <1290633788-25767-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-24 21:57   ` Jean Delvare
     [not found]     ` <20101124225745.403d8f5f-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-11-25 10:43       ` Sebastian Andrzej Siewior
     [not found]         ` <4CEE3DEA.7040107-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-25 21:52           ` Jean Delvare
     [not found]             ` <20101125225246.59931602-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-11-26 18:03               ` [sodaville] " Sebastian Andrzej Siewior
     [not found]                 ` <20101126180325.GA27332-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-26 19:46                   ` Jean Delvare
     [not found]                     ` <20101126204632.6ff96d57-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-11-26 21:14                       ` Sebastian Andrzej Siewior [this message]
2010-12-03  1:58                       ` Ben Dooks

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=20101126211409.GA743@www.tglx.de \
    --to=bigeasy-hfztesqfncyowbw4kg4ksq@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sodaville-hfZtesqFncYOwBW4kG4KsQ@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).