Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: int3496: Request non-exclusive access to the ID GPIO

Some DSDTs are buggy and do a read from the ID pin during the ACPI
initialization, causing the pin to be marked as owned by:
"ACPI:OpRegion" and causing gpiod_get() to fail with -EBUSY.

Pass the GPIOD_FLAGS_BIT_NONEXCLUSIVE flag to the gpiod_get() call
to work around this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Hans de Goede and committed by
Chanwoo Choi
12514f66 019c34aa

+2 -1
+2 -1
drivers/extcon/extcon-intel-int3496.c
··· 106 106 if (ret) 107 107 return ret; 108 108 109 - data->gpio_usb_id = devm_gpiod_get(dev, "id", GPIOD_IN); 109 + data->gpio_usb_id = 110 + devm_gpiod_get(dev, "id", GPIOD_IN | GPIOD_FLAGS_BIT_NONEXCLUSIVE); 110 111 if (IS_ERR(data->gpio_usb_id)) { 111 112 ret = PTR_ERR(data->gpio_usb_id); 112 113 dev_err(dev, "can't request USB ID GPIO: %d\n", ret);