embedded - Load kernel module prior of device tree's probing -


i have developed working driver custom_hardware relies on device tree. because driver may evolve, not want driver part of kernel (when 'be part of kernel', mean, compiled kernel during kernel creation)

here glimpse of dts:

custom_hardware: custom_hardware@0x41006000 {     compatible = "mfg,custom";     reg = <0x41006000 0x1000>;     #interrupt-cells = <0x1>;     interrupt-controller; };  existing_hardware: existing_hardward@41004000 {     compatible = "mfg,existing";     reg = <0x41004000 0x1000>;     interrupt-parent = <&custom_hardware>;     interrupts = <0>; }; 

the existing_hardware's driver compiled kernel (the existing_hardware's driver has been compiled kernel during kernel creation).

what append custom_hardware's driver ramfs , let kernel loads custom_hardware's driver prior of existing_hardware's driver.

this important since existing_hardware's driver requests virq irq_domain of custom_hardware's driver. in order irq_domain, custom_hardware's driver must loaded first.

note existing_hardware's driver gets loaded during probing of device tree seems happen in stage of kernel booting sequence.

that not way do. order of module/driver loading must not matter. need return -eprobe_defer when getting irq fails in existing_hardware. probed again @ later time, after custom_hardware got probed.

also, can apply patch ensure request_irq() fails because domain not present yet , return -eprobe_defer in case https://lkml.org/lkml/2014/2/13/114


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -