From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Mon, 16 May 2005 15:56:06 +0000 Subject: Re: Need persistent node to USB port naming Message-Id: <20050516155606.GB8105@kroah.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id344&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