On Mon, Jun 12, 2023 at 5:16 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > The INT3472 discrete code assumes that the ACPI GPIO resources are > in the same order as the pin-info _DSM entries. > > The returned pin-info includes the pin-number in bits 15-8. Add a check > that this matches with the ACPI GPIO resource pin-number in case > the assumption is not true with some ACPI tables. ... > + u8 active_value, pin, type; > + /* Bits 15-8 contain the pin-number on the GPIO chip */ > + pin = (obj->integer.value >> 8) & 0xff; All the same here, as long as the pin is u8, the ' & 0xff' is no-op as it's already implied. > + if (pin != agpio->pin_table[0]) > + dev_warn(int3472->dev, "%s %s pin number mismatch _DSM %d resource %d\n", %u %u > + func, agpio->resource_source.string_ptr, pin, > + agpio->pin_table[0]); -- With Best Regards, Andy Shevchenko