Sounds good. I'll try that.
> There's another question - what happens if userspace tries to write an
> image when the driver hasn't requested one through hotplug?
If you use request_firmware() directly, userspace will not find any
file to write to :-)
If you really want to be able to do that, instead of using
request_firmware() you could register a class_device of class firmware
and implement 'size'_show/store and 'data'_read/write. Thus exposing
the firmware memory to userspace. The sequence would be like this:
- On size_store you setup the download.
- You can write directly to the device's memory on data_write.
- Once you get all data you get the device back working.
With this approach, you get the hotplug event for free and can take
advantage of compatible userspace scripts.
This is not currently possible, but should be easy to do if found
interesting. I'll provide a (non-functional) sample next time.
Thanks
Manuel
-- --- Manuel Estrada Sainz <ranty@debian.org> <ranty@bigfoot.com> <ranty@users.sourceforge.net> ------------------------ <manuel.estrada@hispalinux.es> ------------------- Let us have the serenity to accept the things we cannot change, courage to change the things we can, and wisdom to know the difference. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/