From: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
Dirk Brandewie
<dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [sodaville] [PATCH] i2c/i2c-dev: use dynamic minor allocation
Date: Fri, 3 Dec 2010 01:58:12 +0000 [thread overview]
Message-ID: <20101203015812.GB20097@trinity.fluff.org> (raw)
In-Reply-To: <20101126204632.6ff96d57-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
On Fri, Nov 26, 2010 at 08:46:32PM +0100, Jean Delvare wrote:
> Hi Sebastian,
>
> On Fri, 26 Nov 2010 19:03:25 +0100, Sebastian Andrzej Siewior wrote:
> > * Jean Delvare | 2010-11-25 22:52:46 [+0100]:
> >
> > >Hi Sebastian,
> > Hi Jean,
> >
> > >> > But my main question is: why do you want a unique (or you probably
> > >> > meant predictable - adapter numbers are already unique by design)
> > >> > adapter number in the first place? Other systems apparently are doing
> > >> > just fine without this.
> > >>
> > >> Both. I use this number for the device id. This one has to remain unique
> > >> or sysfs goes crazy.
> > >
> > >Which "device id" are you talking about, please? Of course sysfs
> > The pci driver [0] has in add_i2c_device() the following construct:
> >
> > pdev->id = dev->devfn << 3 | bar;
> >
> > I'm talking about this device id. Here I have to remain unique and here I
>
> 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?
I think this is due to re-instantiating a platform_device based driver
without adding any extra driver registration to it.
I'm considering the idea that the relevant driver registeration should
be put into the i2c-pxa driver and select the relevant things...
> 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?
>
> > though using the pci id would be a good idea. There should be no other
> > device using "pxa2xx-i2c" as the device name so I should be safe here.
Or add a new platform device name, it isn't difficult.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
prev parent reply other threads:[~2010-12-03 1:58 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
2010-12-03 1:58 ` Ben Dooks [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=20101203015812.GB20097@trinity.fluff.org \
--to=ben-i2c-elnmno+kys3ytjvyw6ydsg@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tglx-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).