From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> On Wed, 26 Jun 2024 13:29:21 +0800, Kent Gibson wrote: > The behaviour of request reconfiguration without a direction flag set is > ill-defined and badly behaved, for both uAPI v1 and v2. I'll will refer > to such a configuration as 'directionless' here. That refers to the > configuration requested, not the actual state of the line. > > The configuration validation used during reconfiguration is borrowed from > the line request operation, where, to verify the intent of the user, the > direction must be set to in order to effect a change to the electrical > configuration of a line. But that validation does not allow for the > directionless case, making it possible to clear flags set previously > without specifying the line direction. > > [...] I applied the first two for fixes and will apply the remaining two for the upcoming merge window once this gets upstream. [1/4] gpiolib: cdev: Disallow reconfiguration without direction (uAPI v1) commit: 9919cce62f68e6ab68dc2a975b5dc670f8ca7d40 [2/4] gpiolib: cdev: Ignore reconfiguration without direction commit: b440396387418fe2feaacd41ca16080e7a8bc9ad Best regards, -- Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>