Re: Platform device id

2007-09-11 Thread Jean Delvare
On 9/11/2007, "Henrique de Moraes Holschuh" <[EMAIL PROTECTED]> wrote: >On Tue, 11 Sep 2007, Jean Delvare wrote: >> I don't know your code and I don't really have the time to look at it >> in depth, but I'm a bit surprised. Presumably your driver is >> implementing a number of interfaces (e.g. hwm

Re: Platform device id

2007-09-11 Thread Henrique de Moraes Holschuh
On Tue, 11 Sep 2007, Jean Delvare wrote: > >I will see what I can do about breaking it up in various modules. But this > >can be unoptimal. If I took it too seriously, thinkpad-acpi would break into > >at least five different modules, if not more, and at least one or two > >modules would need to b

Re: Platform device id

2007-09-11 Thread Jean Delvare
Hi Henrique, On 9/10/2007, "Henrique de Moraes Holschuh" <[EMAIL PROTECTED]> wrote: >On Sat, 08 Sep 2007, Jean Delvare wrote: >> * Detection could be moved to user-space entirely, then we would only >> need a way to instantiate these specific devices from user-space. This >> exists in other areas

Re: Platform device id

2007-09-10 Thread Henrique de Moraes Holschuh
On Sat, 08 Sep 2007, Jean Delvare wrote: > This more general than just the platform bus. It's how the Linux 2.6 > device driver model is designed. No issues about that. It is just that the platform bus sucks a bit if you need to "abuse it" (no wonder!) to hang various different devices that are p

Re: Platform device id

2007-09-10 Thread Henrique de Moraes Holschuh
On Sat, 08 Sep 2007, Jean Delvare wrote: > On Fri, 7 Sep 2007 17:56:59 -0300, Henrique de Moraes Holschuh wrote: > > On 9/7/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > > To go one step further, I am questioning the real value of this naming > > > exception for these "unique" platform devices. O

Re: Platform device id

2007-09-08 Thread Greg KH
On Fri, Sep 07, 2007 at 03:35:59PM +0200, Jean Delvare wrote: > Hi Greg, all, > > While platform_device.id is a u32, platform_device_add() handles "-1" as > a special id value. This has potential for confusion and bugs. One such > bug was reported to me by David Brownell: > > http://lists.lm-sens

Re: Platform device id

2007-09-08 Thread Jean Delvare
On Sat, 8 Sep 2007 00:50:22 -0300, Henrique de Moraes Holschuh wrote: > On Fri, 07 Sep 2007, David Brownell wrote: > > > I don't feel like drivers like hdaps, thinkpad-acpi, dock, bay, > > > and many others really belong in the platform bus. But that's > > > what happens right now. > > > > As a r

Re: Platform device id

2007-09-08 Thread Jean Delvare
On Fri, 7 Sep 2007 17:56:59 -0300, Henrique de Moraes Holschuh wrote: > On 9/7/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > To go one step further, I am questioning the real value of this naming > > exception for these "unique" platform devices. On top of the bugs I > > mentioned above, it has p

Re: Platform device id

2007-09-07 Thread Henrique de Moraes Holschuh
On Fri, 07 Sep 2007, David Brownell wrote: > > The platform for a ThinkPad is either i386 or amd64. > > Both i386 and x86_64 are clearly an "arch". They even live in > an "arch" directory: linux/arch/{i386,x86_64}. Well, I stand corrected on the "platform" term, then. > When folk talk about a

Re: Platform device id

2007-09-07 Thread David Brownell
> > (Also, note that "platform", "host", and "board" are ambiguous. > > In some contexts each is synonymous; in others, not. I avoid > > In this specific case I am talking about, they're not. That is, in *YOUR* usage context they're not. I had to parse what you wrote a few times before your comm

Re: Platform device id

2007-09-07 Thread Henrique de Moraes Holschuh
On Fri, 07 Sep 2007, David Brownell wrote: > > > For that matter, a *driver* should never create its own device node(s) > > > in the first place. Device creation belongs elsewhere, like as part of > > > platform setup or, for busses with integral enumeration support like > > > PCI or USB, bus glue

Re: Platform device id

2007-09-07 Thread David Brownell
> > For that matter, a *driver* should never create its own device node(s) > > in the first place. Device creation belongs elsewhere, like as part of > > platform setup or, for busses with integral enumeration support like > > PCI or USB, bus glue. Linux is moving away from that legacy model. > >

Re: Platform device id

2007-09-07 Thread Henrique de Moraes Holschuh
On Fri, 07 Sep 2007, David Brownell wrote: > For that matter, a *driver* should never create its own device node(s) > in the first place. Device creation belongs elsewhere, like as part of > platform setup or, for busses with integral enumeration support like > PCI or USB, bus glue. Linux is movi

Re: Platform device id

2007-09-07 Thread Henrique de Moraes Holschuh
On Fri, 07 Sep 2007, Dmitry Torokhov wrote: > On 9/7/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > To go one step further, I am questioning the real value of this naming > > exception for these "unique" platform devices. On top of the bugs I > > mentioned above, it has potential for compatibility

Re: Platform device id

2007-09-07 Thread David Brownell
> If a device has a . scheme this implies possibility of > having several instances of said device in a box. There are a few of > platform devices that can only have one instance Like USB peripheral controllers. Only one external "B" type connector is allowed. > - for example i8042 > keyb

Re: Platform device id

2007-09-07 Thread Jean Delvare
Hi Dmitry, Thanks for your answer. On Fri, 7 Sep 2007 10:58:31 -0400, Dmitry Torokhov wrote: > On 9/7/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > While platform_device.id is a u32, platform_device_add() handles "-1" as > > a special id value. This has potential for confusion and bugs. One suc

Re: Platform device id

2007-09-07 Thread Dmitry Torokhov
Hi Jean, On 9/7/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > Hi Greg, all, > > While platform_device.id is a u32, platform_device_add() handles "-1" as > a special id value. This has potential for confusion and bugs. One such > bug was reported to me by David Brownell: > > http://lists.lm-sensors