From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Need persistent node to USB port naming
Date: Mon, 16 May 2005 15:56:06 +0000 [thread overview]
Message-ID: <20050516155606.GB8105@kroah.com> (raw)
In-Reply-To: <NDBBIKDDCLAGMMFDHHDBEEEPDAAA.stephenm@glw.com>
On Mon, May 16, 2005 at 10:40:40AM -0500, Stephen Morgan wrote:
> > On Sat, May 14, 2005 at 12:04 AM, Greg KH wrote:
> > On Fri, May 13, 2005 at 06:29:16PM -0500, Stephen Morgan wrote:
> > >On Fri, May 13, 2005 at 12:55 PM, Greg KH wrote:
> > >> On Fri, May 13, 2005 at 11:55:05AM -0500, Stephen Morgan wrote:
> > >>> One problem I've run into is trying to create a dummy node
> > that allows me to
> > >>> communicate with the driver thru ioctl's even when no device
> > is plugged in.
> > >>> In 2.4, I just created a node with a minor I knew would never
> > be used, and
> > >>> in the driver, I filtered for that minor.
> > >
> > > Any thoughts on how to create this dummy device node?
> >
> > Um, I can't recommend _ever_ doing this kind of thing.
> >
> > That being said, what do you want to get to and from the driver?
>
> It's mostly useful during development. For instance, I can change the
> driver's debug print priority on the fly.
That is useful. So useful that if you look at any usb-serial driver,
they already do this in the /sys/modules/MODULE_NAME/paramaters/debug
file :)
You can get this for free too with the module_param() macro.
> Eventually, I'll use it to retrieve diagnostic info the driver is
> collecting.
sysfs is for 1 value per file. For diagnostic information, I suggest
using debugfs instead, that is what it is there for.
> > Why not just use sysfs files that you put in your driver's directory? That
> > is what they are there for :)
>
> Okay, I'm not sure what you just said, so I'm gonna go read sysfs.txt.
Try the Third Edition of Linux Device Drivers from Oreilly. It's much
better than that outdated file. It's also online for free if you don't
want to buy it.
Good luck,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id\x16344&op=click
_______________________________________________
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
next prev parent reply other threads:[~2005-05-16 15:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-12 19:58 Need persistent node to USB port naming Stephen Morgan
2005-05-13 8:50 ` ocomber
2005-05-13 16:55 ` Stephen Morgan
2005-05-13 18:55 ` Greg KH
2005-05-13 23:29 ` Stephen Morgan
2005-05-14 6:04 ` Greg KH
2005-05-14 16:33 ` Ian Pilcher
2005-05-16 15:40 ` Stephen Morgan
2005-05-16 15:56 ` Greg KH [this message]
2005-05-16 21:40 ` Stephen Morgan
2005-05-16 21:53 ` Greg KH
2005-05-18 20:56 ` Stephen Morgan
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=20050516155606.GB8105@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).