aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-12-28 18:01:39 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2022-05-13 17:03:40 +0900
commit12514f668c1fc608624b23a3cccc4845290c1211 (patch)
treee933e00880979afbb8c2eee14923e5dd2a7a916e /drivers/extcon
parentextcon: int3496: Make the driver a bit less verbose (diff)
downloadlinux-dev-12514f668c1fc608624b23a3cccc4845290c1211.tar.xz
linux-dev-12514f668c1fc608624b23a3cccc4845290c1211.zip
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-intel-int3496.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
index df6ab4ef46f5..20605574020c 100644
--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -106,7 +106,8 @@ static int int3496_probe(struct platform_device *pdev)
if (ret)
return ret;
- data->gpio_usb_id = devm_gpiod_get(dev, "id", GPIOD_IN);
+ data->gpio_usb_id =
+ devm_gpiod_get(dev, "id", GPIOD_IN | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
if (IS_ERR(data->gpio_usb_id)) {
ret = PTR_ERR(data->gpio_usb_id);
dev_err(dev, "can't request USB ID GPIO: %d\n", ret);