On Tue, Oct 01, 2024 at 07:49:39AM +0000, Pankaj Gupta wrote: > >> >Either compile the firmware into the kernel or the ELE driver as module. > >> > >> Cannot compile as part of Firmware. > >> There are OTA scenarios where the latest FW, that is downloaded to > >> replace the image in RFS, and FW needs to be re-init with this new > >> image, by putting the Linux to power-down state. > > > >> ELE driver is compiled as module only, by default. But if someone like > >> to make it as in-line to kernel image, still it should work. > > > I am also not very happy with the situation that we can't compile drivers > into the kernel and just get the firmware later once it is available. > > Driver is enabling the ROM API supports at probe time. > And, once the rootfs is available, and the Firmware image is loaded, then it > will enable the complete set of FW API(s), along with ROM API(s). > > Hence, Driver can be compiled into the kernel to enable ELE-ROM API(s). I see what the code does, I just don't think that it's safe to assume that the rootfs will be mounted after the 50*20ms timeout you use. I also think that it's a valid usecase for builtin code to retry firmware loading after the rootfs has been mounted. This should be integrated into the firmware loading code though and not be done as a driver specific hack. Anyway, it won't be me who merges this code and I am just telling you that you'll likely have a problem getting this upstream as is. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |