From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org, Kay Sievers <kay.sievers@vrfy.org>,
Vojtech Pavlik <vojtech@suse.cz>, Hannes Reinecke <hare@suse.de>,
Patrick Mochel <mochel@digitalimplant.org>,
airlied@linux.ie
Subject: Re: [PATCH] nesting class_device in sysfs to solve world peace
Date: Thu, 06 Oct 2005 16:00:14 +0400 [thread overview]
Message-ID: <434511CE.5080004@tls.msk.ru> (raw)
In-Reply-To: <200510060129.28066.dtor_core@ameritech.net>
Dmitry Torokhov wrote:
> On Wednesday 05 October 2005 19:09, Greg KH wrote:
>
>>On Fri, Sep 30, 2005 at 12:32:49AM -0500, Dmitry Torokhov wrote:
>>
>>>On Wednesday 28 September 2005 18:31, Greg KH wrote:
>>>
>>>>Alright, here's a patch that will add the ability to nest struct
>>>>class_device structures in sysfs. This should give everyone the ability
>>>>to model what they need to in the class directory (input, video, etc.).
>>>
>>>I still do not believe it is the solution we want:
>>>
>>>1. It does not allow installing separate hotplug handlers for devices
>>> and their sub-devices. This will cause hotplug handlers to resort to
>>> having some flags or otherwise detect the king of class device hotplug
>>> hanlder is being called for and change behavior accordingly - YUCK!
>>
>>Huh? I don't understand your complaint here. Why would we ever want to
>>have separate hotplug handlers for the same class? If you do want that,
>>then create separate classes.
>>
>
>
> Yes. I do want separate [sub]classes. I just want them grouped together
> under some <subsystem> name. And I want separate hotplug handlers because
> actions that are needed for these objects are different. When a new
> input_dev appears you want to match its capabilities with one or more
> input handlers and load appropriate handler module if it has not been
> loaded yet. When a new input interface device appears you want to create
> a new device node for it. The handlers should be diffrent if you want
> clean implementation, do you see?
How about using current classes, but name them to have common prefix,
eg input_dev, input_interface etc class names - this way, if a program
wants to enumerare all input <whatever>, it enumerates /sys/class,
finds all directories matching input*, and looks inside...
Maybe not that elegant, but may work.
/mjt
next prev parent reply other threads:[~2005-10-06 12:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 23:31 [PATCH] nesting class_device in sysfs to solve world peace Greg KH
2005-09-30 5:32 ` Dmitry Torokhov
2005-10-06 0:09 ` Greg KH
2005-10-06 0:26 ` Greg KH
2005-10-06 0:29 ` Greg KH
2005-10-06 6:29 ` Dmitry Torokhov
2005-10-06 12:00 ` Michael Tokarev [this message]
2005-10-06 17:40 ` Dmitry Torokhov
2005-10-06 21:22 ` Greg KH
2005-10-06 21:59 ` Dmitry Torokhov
2005-10-11 4:00 ` Adam Belay
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=434511CE.5080004@tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=airlied@linux.ie \
--cc=dtor_core@ameritech.net \
--cc=gregkh@suse.de \
--cc=hare@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=vojtech@suse.cz \
/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