czw., 5 mar 2020 o 15:57 Mark Deneen <mdeneen@xxxxxxxxx> napisał(a): > > Is it possible to use gpiod_line_request to set a given line as an > output but retain the current state of the line? I can not use > gpiod_line_get_value to query the state since the line in question has > not been requested yet. No, because it doesn't make sense. If you're driving the line, you define its state. > > Let's say that I have a userspace process which sets a gpio to high > and I restart the process. I would like for the output to remain high > when I request the line again in the new process. This was possible > with gpiolib+sysfs, is it possible with libgpiod? > This was rather a side effect of sysfs keeping the line exported without any user-space process controlling it. This is not the case with a character device where if the process exits, all resources are freed ie. GPIOs are tied to processes rather than to a sysfs interface. Best regards, Bartosz Golaszewski