On Wed, Nov 30, 2022 at 05:14:38PM +0100, Hans de Goede wrote: > On 11/30/22 17:12, Hans de Goede wrote: > > On 11/30/22 16:55, Andy Shevchenko wrote: ... > > IHMO the rules for get() should simply be: > > > > 1. Device has an input buffer: > > Return input-buffer value for the pin. > > > > 2. Devices does not have an input buffer: > > Return last set output-buffer value > > Quick correction device should be pin here, because it > if there is an input buffer or not can differ per pin. > So IHMO the rules for get() should simply be: > > 1. pin has an input buffer: > return input-buffer value for the pin. > > 2. pin does not have an input buffer: > return the value last set for the pin's output-buffer "pin" misleads here. The "pin" can be in native function which may have not be even connected to GPIO buffers. There are different hardware topologies. So, no, not a "pin". -- With Best Regards, Andy Shevchenko