public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Manuel Estrada Sainz <ranty@debian.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	David Gibson <david@gibson.dropbear.id.au>,
	"Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>
Subject: Re: request_firmware() hotplug interface.
Date: Thu, 1 May 2003 13:19:43 -0700	[thread overview]
Message-ID: <20030501201943.GA3498@kroah.com> (raw)
In-Reply-To: <20030501194702.GA2997@ranty.ddts.net>

On Thu, May 01, 2003 at 09:47:02PM +0200, Manuel Estrada Sainz wrote:
> 
>  - Why I don't think any more that sysfs is good as "the default" for
>    userspace to provide the firmware:
> 	- For drivers providing a sysfs entry for firmware:
> 		It will be trivial to use request_firmware() and arrange the
> 		hotplug scripts to get it copied to their sysfs firmware
> 		entry. They don't need any additional support for copying the
> 		firmware from userspace.

With the code in the latest -bk tree, if you simply create a struct
class and name it "firmware", and then just create a struct class_device
for any struct device that wants firmware to be loaded, you will get a
hotplug event generated for you (with the name "firmware")
automatically.  That is a lot simpler than the firmware.c code you
posted.

> 	- For drivers not providing a sysfs entry for firmware:
> 		They just want the appropriate firmware in a memory buffer. It
> 		doesn't make much sense to hack some code to get a sysfs entry
> 		for them and then tell hotplug where to copy the firmware.
> 		The driver won't know that the entry is there, and it won't
> 		make sense to write data to it unless requested via hotplug.

As all devices in the kernel should now be in sysfs (if not, please let
me know what busses haven't been converted yet), I think the firmware
class is a much simpler way to go.  You get the hotplug call for free,
and a sysfs entry where the firmware can be dumped to, if you want to do
it that way.

thanks,

greg k-h

  reply	other threads:[~2003-05-01 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-01 19:47 request_firmware() hotplug interface Manuel Estrada Sainz
2003-05-01 20:19 ` Greg KH [this message]
2003-05-01 23:32   ` Jeff Muizelaar
2003-05-02  0:11     ` Greg KH
2003-05-04 14:59   ` Manuel Estrada Sainz

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=20030501201943.GA3498@kroah.com \
    --to=greg@kroah.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=david@gibson.dropbear.id.au \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranty@debian.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