In embedded linux for debugging a device which is getting initialized using DT what will be the correct procedure?? I have a device whose probe is getting failed, for further debugging I would like to manually trigger (even though there is no change in driver or DT node )the probe again once system is booted up. Is there any options for that or I have to restart the device every time??
Asked
Active
Viewed 347 times
0
-
1There are options if everything is working properly. Those options include: (1) using a loadable kernel module, which should re-register itself as a driver on module init, and de-register on module exit; (2) Using a device tree overlay to add and remove the device from the live tree dynamically, but that requires kernel patches to support device tree overlay (un)loading from userspace via configfs. The patches are available as git commits from [topic/overlays](https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/overlays). – Ian Abbott Jul 15 '21 at 12:16
-
1I would add the third possible option: driver binding and unbinding. See https://stackoverflow.com/questions/22722520/who-calls-probe-function-in-driver-code and https://lwn.net/Articles/143397/ – Tomas Novotny Jul 16 '21 at 08:00