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 context provided, it seems that the gpiod_line_event_wait_bulk function has limitations when it comes to monitoring GPIO lines from multiple chips using a single bulk structure. Here are some recommendations and observations:
-
Use Individual Structures: Since using individual line structures for each chip works correctly, it is advisable to continue with this approach to ensure proper event monitoring.
-
Explore API Documentation: It might be beneficial to check the gpiod API documentation for any updates or insights that could help in handling multiple chips more effectively. This could provide a more elegant solution if available.
-
Consider Threading or Polling: If you need to monitor multiple chips simultaneously, consider implementing a threading model where each thread handles a separate chip. Although it may seem excessive, it could be a practical solution. Alternatively, a polling mechanism could be implemented, but it may not be as efficient.
Unfortunately, without access to the source code for gpiod or further documentation, these are the best recommendations based on the current context.
Please, also check if these links can help you solve your problem: