On Tue, May 30, 2023 at 6:19 PM Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote: > > For active-low GPIOs the currently available nomenclature requires > regular explaination to the non-enlightened folks, e.g. because a hog explanation > defined as: > > someline { > gpio-hog; > gpios = <24 GPIO_ACTIVE_LOW>; > output-high; > } > > results in the line being set to the physical low level. > > So use the terms "active" and "inactive" which are less ambigous and ambiguous > keep the old names as synonyms. The above example can now be written as: > > someline { > gpio-hog; > gpios = <24 GPIO_ACTIVE_LOW>; > output-active; > } > > where it is less surprising that the output is set to a low level. As I said before, this does not cover the ACPI case. Consider providing an fwnode interface for them and then reuse in OF and/or ACPI if necessary. ... > + GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_OUT_INACTIVE_OPEN_DRAIN, > + GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_OUT_ACTIVE_OPEN_DRAIN, This one is an interesting case, because depending on the transistor polarity this may be active GND or VDD. All the same for OPEN_SOURCE which seems not defined (but should be equivalent to the opposite to the _DRAIN cases). -- With Best Regards, Andy Shevchenko