2018-03-06 2:05 GMT+01:00 Timur Tabi <timur@xxxxxxxxxxxxxx>: > I'm trying to test event handling with a loopback GPIO. I have two > GPIOs, 37 and 38. On my board, they are wired together. I set 37 to > output and 38 to input. If I write 1 to 37, I read a 1 from 38. Same > thing with 0. > > So I'm trying to test GPIO interrupts now. I have this code: > > ret = gpiod_line_request_both_edges_events(input, NULL); > > This function immediately returns with -1. While debugging it, it > appears that the code in core.c is expecting the GPIO to be configured > as output. Is that correct? If so, that doesn't make any sense. I'm > trying to receive an event when a GPIO transitions from 0 to 1 (or 1 > to 0) on input. > > I missing be missing something fundamental. > > -- > Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm > Technologies, Inc. Qualcomm Technologies, Inc. is a member of the > Code Aurora Forum, a Linux Foundation Collaborative Project. What is the error code (errno) after this function fails? Could you share some code? -- Best regards, Bartosz Golaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html