All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Stephen Glow <sglow@embeddedintelligence.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to generate hotplug events in drivers?
Date: Fri, 13 Aug 2004 00:06:43 -0700	[thread overview]
Message-ID: <20040813070643.GA6785@kroah.com> (raw)
In-Reply-To: <411C1EC0.3010302@embeddedintelligence.com>

On Thu, Aug 12, 2004 at 09:52:00PM -0400, Stephen Glow wrote:
> 
> I'm in the process of porting a device driver from the 2.4 kernel to the
> 2.6 kernel.  In the older version of the drivers I was using the devfs
> system to create the device files.  I've decided to rip this out and
> move everything to udev since this seems to be the preferred method now.
> 
> The problem I'm having with this port is that I can't get the udev
> system to create a device file when I install the module.  As far as I
> can tell, no hotplug events are being generated when I insmod the device
> driver.  In other respects the driver seems to be loading correctly;
> I'm able to request the PCI regions, enable, and start the PCI device,
> and allocate a dynamic device major number.  I can also see an entry
> create in the /sys/bus/pci/drivers directory.

udev needs to see a file called "dev" in the proper structure show up in
the sysfs tree in either /sys/class/* or /sys/block/*.  So, you need to
either use the misc char device interface, the block interface, some
other char interface that already has sysfs support, or add your own.
If you need to add your own, I suggest looking into the class_simple
interface, as that's a lot easier to work with to start out with.

Hope this helps,

greg k-h

  reply	other threads:[~2004-08-13  7:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-13  1:52 How to generate hotplug events in drivers? Stephen Glow
2004-08-13  7:06 ` Greg KH [this message]
2004-08-13 17:09   ` Stephen Glow
2004-08-13 17:23     ` 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=20040813070643.GA6785@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sglow@embeddedintelligence.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.