Test if a given GPIO is interruptible #gpio #dts


Is there a way to detect programmatically if a given pin can be configured as interrupt using Zephyr? (e.g. some sort of a map/list or macros that I could reuse).
Are there any side effects in configuring a pin as an interrupt if it didn't have such hardware capability?
Is this information listed in a dts or yaml file or is the only approach to search with a vendor's datasheet if a pin has an interrupt?

What I would like to do is to configure pins dynamically, so that at a given point a GPIO pin is configured as a digital output and later on it is configured as a digital input; if it is interruptible, use that feature preferably, otherwise check its state in a loop.

Thank you!

Join users@lists.zephyrproject.org to automatically receive all group messages.