Background ========== Hi all I am looking to write a driver for a fingerprint sensor found in my laptop. The device has an SPI plus interrupt and reset lines, specified like so: Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { // SPI SpiSerialBusV2 (0x0000, PolarityLow, FourWireMode, 0x08, ControllerInitiated, 0x00989680, ClockPolarityLow, ClockPhaseFirst, "\\_SB.PCI0.SPI1", 0x00, ResourceConsumer, , Exclusive, ) // Interrupt GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000, "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, , ) { // Pin list 0x0000 } // Reset GpioIo (Exclusive, PullUp, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, , ) { // Pin list 0x0008 } }) CreateWordField (RBUF, 0x3B, GPIN) CreateWordField (RBUF, 0x63, SPIN) GPIN = GNUM (0x02000017) SPIN = GNUM (0x0202000A) Return (RBUF) /* \_SB_.SPBA._CRS.RBUF */ } The issue ========= Currently, I call devm_acpi_dev_add_driver_gpios (index 1 for the reset line), then try to access it with devm_gpoid_get, which fails with -EINVAL. >From some kprobe use, I see that the EINVAL appears to stem from intel_config_set, which gpiod_direction_output calls (indirectly) with the config 0x205 -- I understand this to mean PIN_CONFIG_BIAS_PULL_UP with the argument 1, whereas the function expects a specific resistance value; one of {20000, 5000, 2000, 1000}. The problematic call stack, as ftrace sees it (the leaf function is in fact intel_config_set_pull): devm_gpiod_get devm_gpiod_get_index gpiod_get_index gpiod_configure_flags gpiod_direction_output gpio_set_bias gpiochip_generic_config pinctrl_gpio_set_config pinconf_set_config intel_config_set The question ============ Any suggestions as to how this invalid configuration gets produced from the DSDT, and what the best workaround would be? I'm assuming that pullups sometimes get correctly configured purely from ACPI, and this is hitting some edge-case? I'm running 5.8.13 -- if anyone has an inkling that this is a bug that has since been fixed, I'm happy to try and use a more recent kernel. Hardware ======== Laptop is a Huawei Matebook X Pro CPU is an Intel i5-8250U (the specific pinctrl is pinctrl_sunrisepoint) Peripheral is a Goodix GXFP5187 The pin number is 58, seemingly named UART0_RTSB Disclaimer ========== This is my first foray into kernel development and I've been guessing at a lot of things -- please excuse any silly mistakes :) Thanks - Jamie McClymont