linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Another udev/sysfs question.
Date: Sat, 18 Nov 2006 09:03:44 +0000	[thread overview]
Message-ID: <20061118090344.GA17051@kroah.com> (raw)
In-Reply-To: <335DD0B75189FB428E5C32680089FB9F80412F@mtk-sms-mail01.digi.com>

On Fri, Nov 17, 2006 at 10:08:38PM -0600, Kilau, Scott wrote:
> Hi everyone,
> 
> This is really just a sysfs question.
> Not sure if both udev and sysfs questions are dealt with on this list.
> 
> I have a different driver that I am working on now, and porting it to
> use sysfs as well.
> 
> This driver is a "virtual" driver, it doesn't control a board, like on
> a PCI bus, ISA bus, etc, etc.
> 
> I create a "class" for this driver, so it will hang out in /sys/class
> I have gotten my files made in there, so that's working fine.
> 
> Is there a way to create a subdirectory inside of the directory that
> I made in /sys/class ?
> 
> For example, I have /sys/class/digi_realport as the "base" class.
> 
> I would like to hang off subdirectories in there that describe the
> "virtual" nodes for the driver, for example:
> /sys/class/digi_realport/node1 and /sys/class/digi_realport/node2, etc,
> etc.
> 
> Is this possible to do?

"possible" yes.  Should you do it?  No.

What are you really trying to express here in sysfs?  And why do you
need to have a new class for your device, shouldn't it be a real device
and not a class?

If it's a device, you can easily create children of that device using
the driver model.

thanks,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2006-11-18  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-18  4:08 Another udev/sysfs question Kilau, Scott
2006-11-18  9:03 ` Greg KH [this message]
2006-11-19  2:02 ` Kilau, Scott
2006-11-24  8:39 ` Greg KH

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=20061118090344.GA17051@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).