提交 12514f66 编写于 作者: H Hans de Goede 提交者: Chanwoo Choi

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: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 019c34aa
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册