From: "Jean Delvare" <khali@linux-fr.org>
To: hmh@hmh.eng.br
Cc: "David Brownell" <david-b@pacbell.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"gregkh@suse.de" <gregkh@suse.de>,
"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
Subject: Re: Platform device id
Date: Tue, 11 Sep 2007 16:05:33 +0200 (CEST) [thread overview]
Message-ID: <fk7FYVmE.1189519533.5546870.khali@localhost> (raw)
In-Reply-To: <20070911134405.GA18443@khazad-dum.debian.net>
On 9/11/2007, "Henrique de Moraes Holschuh" <hmh@hmh.eng.br> 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. hwmon) and you create a class
>> device for each one. You can have as many class devices hanging of a
>> (physical) device, so I fail to see why you would need to register
>> several (physical) devices.
>
>Namespace clashes. Now that class attributes are gone (or going, whatever),
>everything lives in one namespace: the device. I dread the day I find out
>one class I need has attribute name clashes with another, or (more likely)
>one of my driver-specific attributes clash with one from a generic class.
This shouldn't be the case. Ex-class devices still have their own
directory in sysfs. For example, the radeonfb driver spawns 4 i2c buses
(i2c-adapter class), each gets its own directory.
One problem at the moment is the hwmon subsystem, because we create the
attributes in the physical device rather than in the hwmon class device.
This is for historical reasons, but I presume that we'll have to change
this someday to work around the name space collision issue you
mentioned. If other subsystems are doing the same mistake, this can
explain your problem, but this is a subsystem implementation issue, not
a problem with class devices themselves.
>Even if clashes never happen, it can make quite a mess when you have four or
>more classes in the same device.
I don't agree. This is how things were designed.
>And you can have semanthic clashes, if one
>looks at various attributes (from different classes or driver-specific) and
>think they are related in some obvious way (only, it is not obvious at all,
>and the user didn't read the docs to know it).
There's really no reason why you would be randomly poking at attributes
without knowing which class device they belong to.
--
Jean Delvare
next prev parent reply other threads:[~2007-09-11 14:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 13:35 Jean Delvare
2007-09-07 14:58 ` Dmitry Torokhov
2007-09-07 16:36 ` Jean Delvare
2007-09-07 16:41 ` David Brownell
2007-09-07 21:00 ` Henrique de Moraes Holschuh
2007-09-07 21:41 ` David Brownell
2007-09-07 22:04 ` Henrique de Moraes Holschuh
2007-09-08 0:18 ` David Brownell
2007-09-08 3:50 ` Henrique de Moraes Holschuh
2007-09-08 8:55 ` Jean Delvare
2007-09-10 22:52 ` Henrique de Moraes Holschuh
2007-09-11 7:43 ` Jean Delvare
2007-09-11 13:44 ` Henrique de Moraes Holschuh
2007-09-11 14:05 ` Jean Delvare [this message]
2007-09-07 20:56 ` Henrique de Moraes Holschuh
2007-09-08 8:40 ` Jean Delvare
2007-09-10 22:45 ` Henrique de Moraes Holschuh
2007-09-08 13:30 ` Greg KH
2007-09-09 10:54 ` [PATCH] Make platform_device.id an int Jean Delvare
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=fk7FYVmE.1189519533.5546870.khali@localhost \
--to=khali@linux-fr.org \
--cc=david-b@pacbell.net \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=hmh@hmh.eng.br \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome