Assuming what I should be doing in my driver init function is to check the if the PWM module (PWM_2835) is loaded and ready if not undo my driver init and return -EPROBEDEFER?Although there have been a few changes in this area in recent years, in the general case the kernel does not use the Device Tree to determine probe order for devices. Instead, drivers are supposed to handle the absence of something they depend on - a clock, PWM, etc. - by returning -EPROBEDEFER. The kernel will keep track of deferring devices, repeatedly calling their probe functions after other devices have been created in the hope that their dependencies have now been met.
If I understand correctly how should that check be done? And how can it made to be hardware independent (PWM_2835 vs. whatever provides this in BCM2711/RP1 land)?
Statistics: Posted by wkeeling — Tue Feb 27, 2024 3:06 pm