mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
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, 6 Oct 2005 12:40:08 -0500	[thread overview]
Message-ID: <d120d5000510061040t760c127bpc37212f15c7981c2@mail.gmail.com> (raw)
In-Reply-To: <434511CE.5080004@tls.msk.ru>

On 10/6/05, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 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.
>

We have it right now (see /sys/class/{ieee1394_*|scsi-*|usb_*}) and it
pretty much sucks IMHO. I would like to move from a flat class model
to a more tree-like structure.

--
Dmitry

  reply	other threads:[~2005-10-06 17:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 23:31 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
2005-10-06 17:40         ` Dmitry Torokhov [this message]
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=d120d5000510061040t760c127bpc37212f15c7981c2@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --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=mjt@tls.msk.ru \
    --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

all inboxes | Powered by JetHome®