You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bflb_gpio_irq_type() would return a BFLB_IRQ_MODE_SYNC_EDGE_FALLING
value in case none of the supported types were matched. It happens that
this define is represented by the value 0.
The bflb_gpio_irq_set_type() would reject the value 0 returned by that
function and return -EINVAL. Problem is, that same thing would happen
when the EDGE_FALLING (which is valid) mode was requested making it
impossible to select this mode.
This patch fixes the problem by returning an -EINVAL from the
bflb_gpio_irq_type() in case of an error instead of value 0 so we can
now easily differentiate those two cases and requesting EDGE_FALLING
interrupt is now possible.
Signed-off-by: Krzysztof Adamski <[email protected]>
0 commit comments