I want to read the state of a GPIO pin which is already exported in sysfs. Because SysfsGPIO always writes the direction, the GPIO is reset and the value I want to read is gone.
The CdevGPIO implementation checks if the direction is already set correctly. The same should be done with the SysfsGPIO implementation.
I think this can be addressed by refactoring the export logic a little bit, and then only setting the direction if doesn't match the supplied initial direction.
I want to read the state of a GPIO pin which is already exported in sysfs. Because SysfsGPIO always writes the direction, the GPIO is reset and the value I want to read is gone.
The CdevGPIO implementation checks if the direction is already set correctly. The same should be done with the SysfsGPIO implementation.