On Sun, Apr 07, 2024 at 10:04:53PM +0200, Hans de Goede wrote: > The card-detect GPIO for the microSD slot on Asus T100TA / T100TAM models > stopped working under Linux after commit 6fd03f024828 ("gpiolib: acpi: > support bias pull disable"). > > The GPIO in question is connected to a mechanical switch in the slot > which shorts the pin to GND when a card is inserted. > > The GPIO pin correctly gets configured with a 20K pull-up by the BIOS, > but there is a bug in the DSDT where the GpioInt for the card-detect is > configured with a NoPull setting: PullNone (and seems somewhere else, cover letter?, you used the former, non-ACPI terminology) > GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x2710, > "\\_SB.GPO0", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0026 > } You can decrease indentation for quite a bit. > Linux now actually honors the PullNone setting and disables the 20K pull-up > configured by the BIOS. > > Add a new DMI_QUIRK_SD_CD_ENABLE_PULL_UP quirk which when set calls > mmc_gpiod_set_cd_config() to re-enable the pull-up and set this for > the Asus T100TA models to fix this. ... > Cc: Nuno Sá <nuno.sa@xxxxxxxxxx> This can be after --- ... > - } > + } else if (quirks & DMI_QUIRK_SD_CD_ENABLE_PULL_UP) > + mmc_gpiod_set_cd_config(host->mmc, > + PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 20000)); With {} patch will conform the coding style along with being less noisy. -- With Best Regards, Andy Shevchenko