Replies: 2 comments 4 replies
|
@klauweg libgpiod is simply a library that wraps the Linux kernel API. That API is defined by syscalls, then then will eventually end up calling into your hardware-specific GPIO driver. Your findings (though I do not fully understand exactly what you traced) point towards that driver being slow. So you might want to debug where exactly that time is spent in the kernel (FTRACE might be a good thing to look into as first step). libgpiod itself is unlikely to be the culprit here. |
1 reply
|
Is this the SoC's controller or some external, I2C expander? Which driver is it using exactly? |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm using libgpiod on bananaPi Zero M2.
libgpiod version is 2.2.1.
A simple library call like
gpiod_line_request_set_value(matrix, O_CLK, GPIOD_LINE_VALUE_ACTIVE);needs about 3ms.
Setting a value using a line subset needs about 10ms.
This feels quite slow. Is that normal behaviour?
Unfortunately i'm not very experienced. So i played around with google-profiler and get this output:
So most of the time it is stuck with __libc_do_syscall?
How can this be related to libgpiod?
Any hints are welcome :-).
All reactions