Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Based on the information provided, it seems like you’ve taken the correct steps to enable the rotary encoder driver and apply the device tree overlay. However, the driver is not being loaded, and the device is not appearing in /dev. Here are a few steps to troubleshoot and resolve the issue:
Verify Device Tree Overlay:
Ensure that your device tree overlay is correctly written and applied. Here is an example of what a typical rotary encoder device tree overlay might look like:
Make sure the GPIO pins (SODIMM_100 and SODIMM_102) are correctly mapped in the device tree.
Check Kernel Logs:
Check the kernel logs for any errors or messages related to the rotary encoder driver. You can use the dmesg command to view the kernel logs:
dmesg | grep rotary
This might give you some clues if there are any issues with loading the driver.
Verify GPIO Configuration:
Ensure that the GPIO pins you are using for the rotary encoder are not being used by any other peripheral or function. You can check the pin configuration using the pinmux settings in the device tree.
Manually Load the Driver:
Try manually loading the rotary encoder driver using the modprobe command:
modprobe rotary_encoder
After running this command, check if the driver is loaded using lsmod and if the device appears in /dev.
Check for Missing Dependencies:
Ensure that all necessary dependencies for the rotary encoder driver are included in your kernel configuration. Sometimes, additional modules or configurations might be required.
Rebuild and Reapply the Overlay:
If you made any changes to the device tree overlay, make sure to recompile and reapply it:
If you have followed all these steps and the issue persists, there might be a deeper issue with the driver or the device tree configuration. In such cases, it might be helpful to consult the Toradex community or support for further assistance.
Please, also check if these links can help you solve your problem:
root@colibri-imx7-emmc-15048509:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: gpio-keys
Select the device event number [0-0]: