On Thu, 01 Aug 2019, Timur Tabi wrote:
On 7/31/19 12:58 PM, Jeffrey Hugo wrote:
static int gpiochip_alloc_valid_mask(struct gpio_chip *gc) { if (IS_ENABLED(CONFIG_OF_GPIO)) gc->need_valid_mask = of_gpio_need_valid_mask(gc); if (!gc->need_valid_mask) return 0;
So this seems wrong on a system with OF and ACPI. It assumes that OF takes priority over ACPI if both are enabled, and that's not true in general. If anything, it's the other way around.
Device Tree has priority in the Linux Kernel. If the bootloader provides both (which breaks SBBR and EBBR compliance by the way!), then the kernel will choose DT.
I guess this is because DT is more fluid (much to the originator's dismay I should imagine) and can be used to fix broken ACPI tables which tend to be more of a permanent fixture.