On Mon, Dec 02, 2019 at 12:36:47PM +0000, Stanimir, Vasile-Laurentiu wrote: > From f8093f2c73c636b75fcf4dee4178af0e24c2f878 Mon Sep 17 00:00:00 2001 > From: Vasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@xxxxxxxxxxxxx> > Date: Mon, 2 Dec 2019 14:20:11 +0200 > Subject: [PATCH] gpiolib-acpi: Set gpiod flags for ACPI GPIO resources based > on pullup and polarity > > ACPI GPIO resources don't contain an initial value for the > GPIO. Therefore instead of deducting its value based on pullup field > we should deduce that value from the polarity and the pull field. > Typical scenario is when ACPI is defined in acpi-table and its polarity > is defined as ACTIVE-LOW in the following call: > > acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data) > acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio) > > it will return GPIOD_OUT_HIGH if pull_up is set no matter if > polarity is GPIO_ACTIVE_LOW, so it will return the current level instead > of the logical level. Thank you for the patch. I have question in general. If we have Active Low polarity and Pull Down, isn't it simple a bad ACPI table and rather quirk is needed here? -- With Best Regards, Andy Shevchenko